Skip to content

Commit b44c952

Browse files
authored
Fix Rider Test Suites (#4419)
* checking tests fail * fix solution path
1 parent b8bef67 commit b44c952

File tree

7 files changed

+25
-8
lines changed

7 files changed

+25
-8
lines changed

buildspec/linuxIntegrationTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ phases:
3939
- ls -alh $AWS_CONFIG_FILE
4040
- cat $AWS_CONFIG_FILE
4141
- chmod +x gradlew
42-
- DISPLAY=:22 ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME integrationTest coverageReport -x :plugin-toolkit:jetbrains-rider:integrationTest --info --console plain
42+
- DISPLAY=:22 ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME integrationTest coverageReport --info --console plain
4343
- |
4444
if [ $(docker ps -q | wc -l) -gt 0 ]; then
4545
echo 'Docker containers were not completely cleaned up!';

buildspec/windowsTests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ phases:
3737
}
3838
3939
# Rider is very expensive (spikes our CI jobs to 50% CPU, so let it do the prep work in parallel, but run tests later
40-
./gradlew -PideProfileName="$Env:ALTERNATIVE_IDE_PROFILE_NAME" check :plugin-toolkit:jetbrains-rider:compileTestKotlin -x :plugin-toolkit:jetbrains-rider:test --info --console plain --continue
40+
./gradlew -PideProfileName="$Env:ALTERNATIVE_IDE_PROFILE_NAME" check :plugin-toolkit:jetbrains-rider:compileTestKotlin --info --console plain --continue
4141
if ($LastExitCode -ne 0) {
4242
Write-Host "Command failed with exit code $LastExitCode"
4343
exit -1

buildspec/windowsTestsForToolkit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ phases:
3737
}
3838
3939
# Rider is very expensive (spikes our CI jobs to 50% CPU, so let it do the prep work in parallel, but run tests later
40-
./gradlew -PideProfileName="$Env:ALTERNATIVE_IDE_PROFILE_NAME" :plugin-toolkit:intellij-standalone:check :plugin-toolkit:jetbrains-rider:compileTestKotlin -x :plugin-toolkit:jetbrains-rider:test --info --console plain --continue
40+
./gradlew -PideProfileName="$Env:ALTERNATIVE_IDE_PROFILE_NAME" :plugin-toolkit:intellij-standalone:check :plugin-toolkit:jetbrains-rider:compileTestKotlin --info --console plain --continue
4141
if ($LastExitCode -ne 0) {
4242
Write-Host "Command failed with exit code $LastExitCode"
4343
exit -1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ abstract class DotnetLocalLambdaRunConfigurationIntegrationTestBase(private val
5656
PropertiesComponent.getInstance().setValue("debugger.immediate.window.in.watches", initialImmediateWindow)
5757
}
5858

59-
override fun getSolutionDirectoryName(): String = solutionName
59+
override fun getSolutionDirectoryName(): String = "testData/solutions/$solutionName"
6060

6161
@Test
6262
fun samIsExecutedDebugger() {
@@ -151,7 +151,7 @@ abstract class DotnetLocalLambdaImageRunConfigurationIntegrationTestBase(private
151151
removeAllBreakpoints(project)
152152
}
153153

154-
override fun getSolutionDirectoryName(): String = solutionName
154+
override fun getSolutionDirectoryName(): String = "testData/solutions/$solutionName"
155155

156156
@Test
157157
fun samIsExecutedImage() {

plugins/toolkit/jetbrains-rider/resources/META-INF/ext-rider.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<handlerResolver id="DOTNET" implementationClass="software.aws.toolkits.jetbrains.services.lambda.dotnet.DotNetLambdaHandlerResolver"/>
3030
<handlerCompletion id="DOTNET" implementationClass="software.aws.toolkits.jetbrains.services.lambda.completion.DotNetHandlerCompletion"/>
3131
<sam.runtimeDebugSupport id="DOTNET" implementationClass="software.aws.toolkits.jetbrains.services.lambda.dotnet.DotNetRuntimeDebugSupport"/>
32-
<sam.imageDebuggerSupport implementation="software.aws.toolkits.jetbrains.services.lambda.dotnet.Dotnet50ImageDebug"/>
3332
<sam.imageDebuggerSupport implementation="software.aws.toolkits.jetbrains.services.lambda.dotnet.Dotnet60ImageDebug"/>
3433
<sam.projectWizard id="DOTNET" implementationClass="software.aws.toolkits.jetbrains.services.lambda.dotnet.DotNetSamProjectWizard"/>
3534
</extensions>

plugins/toolkit/jetbrains-rider/src-232+/software/aws/toolkits/jetbrains/utils/OpenSolutionFileParams.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ package software.aws.toolkits.jetbrains.utils
66
import java.io.File
77

88
typealias OpenSolutionFileParams = com.jetbrains.rider.test.OpenSolutionParams
9-
fun openSolutionFile(solutionDirName: String) = File(solutionDirName)
9+
fun openSolutionFile(solutionDirName: String): File {
10+
val solutionFileName = when {
11+
solutionDirName.endsWith("SamHelloWorldApp") -> "SamHelloWorldApp.sln"
12+
solutionDirName.endsWith("EchoLambda6X") -> "EchoLambda.sln"
13+
solutionDirName.endsWith("ImageLambda6X") -> "ImageLambda.sln"
14+
else -> throw IllegalArgumentException("Unsupported solution directory: $solutionDirName")
15+
}
16+
return File("$solutionDirName/$solutionFileName")
17+
}
1018

11-
const val OPEN_SOLUTION_DIR_NAME: String = "testData/solutions/SamHelloWorldApp/SamHelloWorldApp.sln"
19+
const val OPEN_SOLUTION_DIR_NAME: String = "testData/solutions/SamHelloWorldApp"

plugins/toolkit/jetbrains-rider/tst/software/aws/toolkits/jetbrains/services/lambda/dotnet/LambdaGutterMarkHighlightingTest.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import base.backendStartTimeout
77
import com.jetbrains.rdclient.testFramework.waitForDaemon
88
import com.jetbrains.rider.projectView.solution
99
import com.jetbrains.rider.test.base.BaseTestWithMarkup
10+
import org.testng.SkipException
11+
import org.testng.annotations.BeforeMethod
1012
import org.testng.annotations.DataProvider
1113
import org.testng.annotations.Test
1214
import software.aws.toolkits.jetbrains.protocol.awsSettingModel
@@ -18,6 +20,14 @@ class LambdaGutterMarkHighlightingTest : BaseTestWithMarkup() {
1820
private const val LAMBDA_RUN_MARKER_ATTRIBUTE_ID = "AWS Lambda Run Method Gutter Mark"
1921
}
2022

23+
@BeforeMethod
24+
fun skipTestsOnWindows() {
25+
val ideVersion = System.getProperty("org.gradle.project.ideProfileName")
26+
if (System.getProperty("os.name").contains("Windows") && ideVersion == "2023.2") {
27+
throw SkipException("Test skipped because it flakes on Windows 2023.2")
28+
}
29+
}
30+
2131
override val backendLoadedTimeout: Duration = backendStartTimeout
2232
override val backendShellLoadTimeout: Duration = backendStartTimeout
2333

0 commit comments

Comments
 (0)