Skip to content

Commit 2d4a7cc

Browse files
committed
chore: fix integration tests
Signed-off-by: Stephane Bouchet <[email protected]>
1 parent dabbd3b commit 2d4a7cc

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ dependencies {
2323
api(libs.remote.fixtures)
2424
}
2525

26-
2726
java {
28-
sourceCompatibility = JavaVersion.VERSION_21
29-
targetCompatibility = JavaVersion.VERSION_21
27+
toolchain {
28+
languageVersion = JavaLanguageVersion.of(21)
29+
}
3030
withSourcesJar()
3131
withJavadocJar()
3232
}

src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,13 @@ public static RemoteRobot runIde(IntelliJVersion ideaVersion, int port) {
7979
String fileExtension = OS_NAME.contains("windows") ? ".bat" : "";
8080
String[] platformTypeVersion = generatePlatformTypeVersion();
8181

82-
ProcessBuilder pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-PideaVersion=" + ideaVersion, "-Drobot-server.port=" + port, "-PplatformType=" + platformTypeVersion[0], "-PplatformVersion=" + platformTypeVersion[1]);
82+
ProcessBuilder pb = null;
8383

84+
if (ideaVersion.toInt() < 20242) {
85+
pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-PideaVersion=" + ideaVersion, "-Drobot-server.port=" + port);
86+
} else {
87+
pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-Drobot-server.port=" + port, "-PplatformType=" + platformTypeVersion[0], "-PplatformVersion=" + platformTypeVersion[1]);
88+
}
8489
boolean isDebugOn = Boolean.parseBoolean(System.getProperty("intellij_debug", "false")); // For more info on intellij_debug please check README
8590
if (isDebugOn) {
8691
redirectProcessOutputs(pb);

src/test-project/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ group = "com.redhat.devtools.intellij"
99
version = "1.0-SNAPSHOT"
1010
val platformVersion = providers.gradleProperty("ideaVersion").get()
1111

12+
java {
13+
toolchain {
14+
languageVersion = JavaLanguageVersion.of(21)
15+
}
16+
}
17+
1218
repositories {
1319
mavenCentral()
1420
intellijPlatform {

0 commit comments

Comments
 (0)