[maven] IDEA-381950 improve output in MavenRepositoriesDownloadingTest

GitOrigin-RevId: 255a94eaae9fe8352aa79b8e7477919a80ffe13c
This commit is contained in:
Dmitry Kichinsky
2025-11-13 19:27:24 +00:00
committed by intellij-monorepo-bot
parent 8df5d8f3fa
commit 02baea5b5c
2 changed files with 5 additions and 12 deletions
@@ -43,7 +43,7 @@ class MavenRepositoriesDownloadingTest : MavenMultiVersionImportingTestCase() {
connection.setRequestMethod("GET")
connection.connect()
val response = getResponse(connection)
MavenLog.LOG.warn("Response $response")
MavenLog.LOG.warn("Response ${response.take(50)}")
val responseCode = connection.responseCode
connection.disconnect()
@@ -15,7 +15,6 @@ import com.intellij.openapi.module.ModuleManager
import com.intellij.openapi.module.ModuleWithNameAlreadyExists
import com.intellij.openapi.progress.EmptyProgressIndicator
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.runBlockingCancellable
import com.intellij.openapi.progress.runBlockingMaybeCancellable
import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.ModuleListener
@@ -457,16 +456,16 @@ abstract class MavenImportingTestCase : MavenTestCase() {
assertTrue("Auto-reload is disabled in this test", isAutoReloadEnabled)
}
protected fun assertHasPendingProjectForReload() {
protected suspend fun assertHasPendingProjectForReload() {
assertAutoReloadIsEnabled()
blockTillCinfigurationReady()
awaitConfiguration()
assertTrue("Expected notification about pending projects for auto-reload", myNotificationAware!!.isNotificationVisible())
assertNotEmpty(myNotificationAware!!.getProjectsWithNotification())
}
protected fun assertNoPendingProjectForReload() {
protected suspend fun assertNoPendingProjectForReload() {
assertAutoReloadIsEnabled()
blockTillCinfigurationReady()
awaitConfiguration()
assertFalse(myNotificationAware!!.isNotificationVisible())
assertEmpty(myNotificationAware!!.getProjectsWithNotification())
}
@@ -499,12 +498,6 @@ abstract class MavenImportingTestCase : MavenTestCase() {
}
}
protected fun blockTillCinfigurationReady() {
runBlockingCancellable {
awaitConfiguration()
}
}
private fun logConfigurationMessage(message: String) {
if (message.contains("scanning")) return
MavenLog.LOG.warn(message)