Skip to content

Commit ed27047

Browse files
authored
Disable CodeWhisperer integration tests on CI (#3522)
1 parent 848936f commit ed27047

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

jetbrains-core/it/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererIntegrationTestBase.kt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import com.intellij.testFramework.runInEdtAndWait
1515
import kotlinx.coroutines.runBlocking
1616
import org.assertj.core.api.Assertions.assertThat
1717
import org.junit.After
18+
import org.junit.Assume.assumeTrue
1819
import org.junit.Before
1920
import org.junit.Rule
2021
import org.mockito.kotlin.any
@@ -81,6 +82,7 @@ open class CodeWhispererIntegrationTestBase(val projectRule: CodeInsightTestFixt
8182
@Suppress("UnreachableCode")
8283
@Before
8384
open fun setUp() {
85+
assumeTrue("CI doesn't have Builder ID credentials", System.getenv("CI").isNullOrBlank())
8486
MockClientManager.useRealImplementations(disposableRule.disposable)
8587

8688
loginSso(projectRule.project, SONO_URL)
@@ -138,9 +140,17 @@ open class CodeWhispererIntegrationTestBase(val projectRule: CodeInsightTestFixt
138140
@After
139141
open fun tearDown() {
140142
runInEdtAndWait {
141-
stateManager.loadState(originalExplorerActionState)
142-
settingsManager.loadState(originalSettings)
143-
popupManager.reset()
143+
if (::stateManager.isInitialized) {
144+
stateManager.loadState(originalExplorerActionState)
145+
}
146+
147+
if (::settingsManager.isInitialized) {
148+
settingsManager.loadState(originalSettings)
149+
}
150+
151+
if (::popupManager.isInitialized) {
152+
popupManager.reset()
153+
}
144154
}
145155
}
146156

0 commit comments

Comments
 (0)