From 37d4c20ae9306ba327305ae78b6dde95cf88f3c0 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Mon, 2 Jun 2025 14:21:10 +0200 Subject: [PATCH] Use "sonar.scanner.skipJreProvisioning" in integration tests On ephemeral CI machine this avoids unnecessary downloading and unpacking of JRE from SQ and thus reduces time of execution of the first project analysis in integration tests. During execution of integration tests we already have suitable JDK. Testing of JRE provisioning feature should not be the responsibility of analyzers. --- its/plugin/src/test/java/org/sonarsource/slang/TestBase.java | 1 + .../src/test/java/org/sonarsource/slang/SlangRulingTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/its/plugin/src/test/java/org/sonarsource/slang/TestBase.java b/its/plugin/src/test/java/org/sonarsource/slang/TestBase.java index 6b42d90..e0d4ded 100644 --- a/its/plugin/src/test/java/org/sonarsource/slang/TestBase.java +++ b/its/plugin/src/test/java/org/sonarsource/slang/TestBase.java @@ -53,6 +53,7 @@ protected SonarScanner getSonarScanner(String projectKey, String directoryToScan ORCHESTRATOR.getServer().associateProjectToQualityProfile(projectKey, languageKey, profileName); } return SonarScanner.create() + .setProperty("sonar.scanner.skipJreProvisioning", "true") .setProjectDir(new File(directoryToScan, languageKey)) .setProjectKey(projectKey) .setProjectName(projectKey) diff --git a/its/ruling/src/test/java/org/sonarsource/slang/SlangRulingTest.java b/its/ruling/src/test/java/org/sonarsource/slang/SlangRulingTest.java index ce1b387..a51e797 100644 --- a/its/ruling/src/test/java/org/sonarsource/slang/SlangRulingTest.java +++ b/its/ruling/src/test/java/org/sonarsource/slang/SlangRulingTest.java @@ -111,6 +111,7 @@ private void run_ruling_test(String project, Map projectProperti File litsDifferencesFile = FileLocation.of("build/" + projectKey + "-differences").getFile(); SonarScanner build = SonarScanner.create(FileLocation.of("../").getFile()) + .setProperty("sonar.scanner.skipJreProvisioning", "true") .setProjectKey(projectKey) .setProjectName(projectKey) .setProjectVersion("1")