Skip to content

Commit df467ff

Browse files
authored
Re-enable Rider debug tests on 2020.3 (#2438)
1 parent 35b95a6 commit df467ff

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

buildSrc/src/software/aws/toolkits/gradle/IdeVersions.kt

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ object IdeVersions {
6363
"com.intellij.database",
6464
"Pythonid:203.5981.165"
6565
),
66+
riderSdkOverride = "2020.3.2",
6667
ijSdkOverride = "2020.3",
6768
rdGenVersion = "0.203.161",
6869
nugetVersion = "2020.3.0"

jetbrains-rider/it/software/aws/toolkits/jetbrains/services/lambda/dotnet/DotnetLocalLambdaRunConfigurationIntegrationTest.kt

+24-14
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import base.AwsReuseSolutionTestBase
77
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
88
import com.fasterxml.jackson.module.kotlin.readValue
99
import com.intellij.execution.executors.DefaultDebugExecutor
10-
import com.intellij.openapi.application.ApplicationInfo
10+
import com.intellij.ide.util.PropertiesComponent
1111
import com.jetbrains.rider.projectView.solutionDirectory
1212
import org.assertj.core.api.Assertions.assertThat
13-
import org.testng.SkipException
13+
import org.testng.annotations.AfterMethod
1414
import org.testng.annotations.BeforeMethod
1515
import org.testng.annotations.Test
1616
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
@@ -27,9 +27,7 @@ class Dotnet21LocalLambdaRunConfigurationIntegrationTest : DotnetLocalLambdaRunC
2727
class Dotnet21LocalLambdaImageRunConfigurationIntegrationTest :
2828
DotnetLocalLambdaImageRunConfigurationIntegrationTestBase("ImageLambda2X", LambdaRuntime.DOTNETCORE2_1)
2929

30-
class Dotnet31LocalLambdaRunConfigurationIntegrationTest : DotnetLocalLambdaRunConfigurationIntegrationTestBase("EchoLambda3X", LambdaRuntime.DOTNETCORE3_1) {
31-
override val disableOn203 = false // At least run one test suite, running more than one will trigger failures
32-
}
30+
class Dotnet31LocalLambdaRunConfigurationIntegrationTest : DotnetLocalLambdaRunConfigurationIntegrationTestBase("EchoLambda3X", LambdaRuntime.DOTNETCORE3_1)
3331

3432
class Dotnet31LocalLambdaImageRunConfigurationIntegrationTest :
3533
DotnetLocalLambdaImageRunConfigurationIntegrationTestBase("ImageLambda3X", LambdaRuntime.DOTNETCORE3_1)
@@ -46,23 +44,28 @@ abstract class DotnetLocalLambdaRunConfigurationIntegrationTestBase(private val
4644
private val mockCreds = AwsBasicCredentials.create("Access", "ItsASecret")
4745
private val handler = "EchoLambda::EchoLambda.Function::FunctionHandler"
4846

49-
protected open val disableOn203 = true
47+
private var initialImmediateWindow: Boolean = false
5048

5149
@BeforeMethod
5250
fun setUp() {
51+
// Disable the immediate window due to double release of editor in 203, this issue should be fixed in later Rider versions FIX_WHEN_MIN_IS_211
52+
initialImmediateWindow = PropertiesComponent.getInstance().getBoolean("debugger.immediate.window.in.watches")
53+
PropertiesComponent.getInstance().setValue("debugger.immediate.window.in.watches", false, true)
54+
5355
setSamExecutableFromEnvironment()
5456

5557
MockCredentialsManager.getInstance().addCredentials(mockId, mockCreds)
5658
}
5759

60+
@AfterMethod
61+
fun tearDown() {
62+
PropertiesComponent.getInstance().setValue("debugger.immediate.window.in.watches", initialImmediateWindow)
63+
}
64+
5865
override fun getSolutionDirectoryName(): String = solutionName
5966

6067
@Test
6168
fun samIsExecutedDebugger() {
62-
if (disableOn203 && ApplicationInfo.getInstance().build.baselineVersion >= 203) {
63-
throw SkipException("Test skipped due to double release of editor on 203")
64-
}
65-
6669
setBreakpoint()
6770

6871
val runConfiguration = createHandlerBasedRunConfiguration(
@@ -120,13 +123,24 @@ abstract class DotnetLocalLambdaImageRunConfigurationIntegrationTestBase(private
120123
private val mockId = "MockCredsId"
121124
private val mockCreds = AwsBasicCredentials.create("Access", "ItsASecret")
122125

126+
private var initialImmediateWindow: Boolean = false
127+
123128
@BeforeMethod
124129
fun setUp() {
130+
// Disable the immediate window due to double release of editor in 203, this issue should be fixed in later Rider versions FIX_WHEN_MIN_IS_211
131+
initialImmediateWindow = PropertiesComponent.getInstance().getBoolean("debugger.immediate.window.in.watches")
132+
PropertiesComponent.getInstance().setValue("debugger.immediate.window.in.watches", false, true)
133+
125134
setSamExecutableFromEnvironment()
126135

127136
MockCredentialsManager.getInstance().addCredentials(mockId, mockCreds)
128137
}
129138

139+
@AfterMethod
140+
fun tearDown() {
141+
PropertiesComponent.getInstance().setValue("debugger.immediate.window.in.watches", initialImmediateWindow)
142+
}
143+
130144
override fun getSolutionDirectoryName(): String = solutionName
131145

132146
@Test
@@ -149,10 +163,6 @@ abstract class DotnetLocalLambdaImageRunConfigurationIntegrationTestBase(private
149163

150164
@Test
151165
fun samIsExecutedDebuggerImage() {
152-
if (ApplicationInfo.getInstance().build.baselineVersion >= 203) {
153-
throw SkipException("Test skipped due to double release of editor on 203")
154-
}
155-
156166
setBreakpoint()
157167

158168
val template = "${project.solutionDirectory}/template.yaml"

0 commit comments

Comments
 (0)