@@ -7,10 +7,10 @@ import base.AwsReuseSolutionTestBase
7
7
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
8
8
import com.fasterxml.jackson.module.kotlin.readValue
9
9
import com.intellij.execution.executors.DefaultDebugExecutor
10
- import com.intellij.openapi.application.ApplicationInfo
10
+ import com.intellij.ide.util.PropertiesComponent
11
11
import com.jetbrains.rider.projectView.solutionDirectory
12
12
import org.assertj.core.api.Assertions.assertThat
13
- import org.testng.SkipException
13
+ import org.testng.annotations.AfterMethod
14
14
import org.testng.annotations.BeforeMethod
15
15
import org.testng.annotations.Test
16
16
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials
@@ -27,9 +27,7 @@ class Dotnet21LocalLambdaRunConfigurationIntegrationTest : DotnetLocalLambdaRunC
27
27
class Dotnet21LocalLambdaImageRunConfigurationIntegrationTest :
28
28
DotnetLocalLambdaImageRunConfigurationIntegrationTestBase (" ImageLambda2X" , LambdaRuntime .DOTNETCORE2_1 )
29
29
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 )
33
31
34
32
class Dotnet31LocalLambdaImageRunConfigurationIntegrationTest :
35
33
DotnetLocalLambdaImageRunConfigurationIntegrationTestBase (" ImageLambda3X" , LambdaRuntime .DOTNETCORE3_1 )
@@ -46,23 +44,28 @@ abstract class DotnetLocalLambdaRunConfigurationIntegrationTestBase(private val
46
44
private val mockCreds = AwsBasicCredentials .create(" Access" , " ItsASecret" )
47
45
private val handler = " EchoLambda::EchoLambda.Function::FunctionHandler"
48
46
49
- protected open val disableOn203 = true
47
+ private var initialImmediateWindow : Boolean = false
50
48
51
49
@BeforeMethod
52
50
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
+
53
55
setSamExecutableFromEnvironment()
54
56
55
57
MockCredentialsManager .getInstance().addCredentials(mockId, mockCreds)
56
58
}
57
59
60
+ @AfterMethod
61
+ fun tearDown () {
62
+ PropertiesComponent .getInstance().setValue(" debugger.immediate.window.in.watches" , initialImmediateWindow)
63
+ }
64
+
58
65
override fun getSolutionDirectoryName (): String = solutionName
59
66
60
67
@Test
61
68
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
-
66
69
setBreakpoint()
67
70
68
71
val runConfiguration = createHandlerBasedRunConfiguration(
@@ -120,13 +123,24 @@ abstract class DotnetLocalLambdaImageRunConfigurationIntegrationTestBase(private
120
123
private val mockId = " MockCredsId"
121
124
private val mockCreds = AwsBasicCredentials .create(" Access" , " ItsASecret" )
122
125
126
+ private var initialImmediateWindow: Boolean = false
127
+
123
128
@BeforeMethod
124
129
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
+
125
134
setSamExecutableFromEnvironment()
126
135
127
136
MockCredentialsManager .getInstance().addCredentials(mockId, mockCreds)
128
137
}
129
138
139
+ @AfterMethod
140
+ fun tearDown () {
141
+ PropertiesComponent .getInstance().setValue(" debugger.immediate.window.in.watches" , initialImmediateWindow)
142
+ }
143
+
130
144
override fun getSolutionDirectoryName (): String = solutionName
131
145
132
146
@Test
@@ -149,10 +163,6 @@ abstract class DotnetLocalLambdaImageRunConfigurationIntegrationTestBase(private
149
163
150
164
@Test
151
165
fun samIsExecutedDebuggerImage () {
152
- if (ApplicationInfo .getInstance().build.baselineVersion >= 203 ) {
153
- throw SkipException (" Test skipped due to double release of editor on 203" )
154
- }
155
-
156
166
setBreakpoint()
157
167
158
168
val template = " ${project.solutionDirectory} /template.yaml"
0 commit comments