From 32a1a4dae1fdc1c366975cf98f44423b7b0b07c2 Mon Sep 17 00:00:00 2001 From: Antoine Vigneau Date: Wed, 6 Dec 2023 16:29:06 +0100 Subject: [PATCH] SONAR-20652 Upgrade Orchestrator to 4.5.0.1700 --- build.gradle | 2 +- server/sonar-db-dao/build.gradle | 2 +- .../java/org/sonar/db/OrchestratorSettingsUtils.java | 2 +- .../main/java/org/sonar/process/ProcessProperties.java | 2 +- .../DefaultAdminCredentialsVerifierFilter.java | 2 +- sonar-ws-generator/build.gradle | 2 +- .../sonarqube/wsgenerator/ApiDefinitionDownloader.java | 8 ++++---- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 424983d0623..10c51e2f8ef 100644 --- a/build.gradle +++ b/build.gradle @@ -343,7 +343,7 @@ subprojects { dependency 'org.postgresql:postgresql:42.5.1' dependency 'org.reflections:reflections:0.10.2' dependency 'org.simpleframework:simple:5.1.6' - dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.40.0.183' + dependency 'org.sonarsource.orchestrator:sonar-orchestrator-junit4:4.5.0.1700' dependency 'org.sonarsource.update-center:sonar-update-center-common:1.29.0.1000' dependency('org.springframework:spring-context:5.3.27') { exclude 'commons-logging:commons-logging' diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle index f4210fdc6d3..d777d3c04e3 100644 --- a/server/sonar-db-dao/build.gradle +++ b/server/sonar-db-dao/build.gradle @@ -27,7 +27,7 @@ dependencies { testImplementation 'org.assertj:assertj-core' testImplementation 'org.assertj:assertj-guava' testImplementation 'org.mockito:mockito-core' - testImplementation 'org.sonarsource.orchestrator:sonar-orchestrator' + testImplementation 'org.sonarsource.orchestrator:sonar-orchestrator-junit4' testImplementation project(':sonar-testing-harness') testImplementation project(':sonar-plugin-api-impl') diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java index 5acb7e9d1d7..c2540c2b092 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java @@ -68,7 +68,7 @@ public class OrchestratorSettingsUtils { settings.setProperty(entry.getKey(), interpolatedValue); } } catch (Exception e) { - throw new IllegalStateException("Cannot load Orchestrator properties from:" + url, e); + throw new IllegalStateException("Cannot load OrchestratorRule properties from:" + url, e); } finally { IOUtils.closeQuietly(input); } diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java index a2d2857812c..96d439e66e9 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java @@ -178,7 +178,7 @@ public class ProcessProperties { SONAR_UPDATECENTER_ACTIVATE("sonar.updatecenter.activate", "true"), /** - * Used by Orchestrator to ask for shutdown of monitor process + * Used by OrchestratorRule to ask for shutdown of monitor process */ ENABLE_STOP_COMMAND("sonar.enableStopCommand"), diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierFilter.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierFilter.java index e6fe4e594ed..c487f0c4cfa 100644 --- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierFilter.java +++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/DefaultAdminCredentialsVerifierFilter.java @@ -39,7 +39,7 @@ import static org.sonar.server.authentication.AuthenticationRedirection.redirect public class DefaultAdminCredentialsVerifierFilter extends ServletFilter { private static final String RESET_PASSWORD_PATH = "/account/reset_password"; private static final String CHANGE_ADMIN_PASSWORD_PATH = "/admin/change_admin_password"; - // This property is used by Orchestrator to disable this force redirect. It should never be used in production, which + // This property is used by OrchestratorRule to disable this force redirect. It should never be used in production, which // is why this is not defined in org.sonar.process.ProcessProperties. private static final String SONAR_FORCE_REDIRECT_DEFAULT_ADMIN_CREDENTIALS = "sonar.forceRedirectOnDefaultAdminCredentials"; diff --git a/sonar-ws-generator/build.gradle b/sonar-ws-generator/build.gradle index a57236825a8..df3d2ac2ef2 100644 --- a/sonar-ws-generator/build.gradle +++ b/sonar-ws-generator/build.gradle @@ -13,7 +13,7 @@ dependencies { api 'commons-collections:commons-collections:3.2.2' api 'org.apache.velocity:velocity:1.7' api 'org.slf4j:log4j-over-slf4j' - api 'org.sonarsource.orchestrator:sonar-orchestrator' + api 'org.sonarsource.orchestrator:sonar-orchestrator-junit4' compileOnlyApi 'com.google.code.findbugs:jsr305' } diff --git a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java index f448bc3540c..3e1f0c4c48b 100644 --- a/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java +++ b/sonar-ws-generator/src/main/java/org/sonarqube/wsgenerator/ApiDefinitionDownloader.java @@ -19,10 +19,10 @@ */ package org.sonarqube.wsgenerator; -import com.sonar.orchestrator.Orchestrator; -import com.sonar.orchestrator.OrchestratorBuilder; import com.sonar.orchestrator.http.HttpCall; import com.sonar.orchestrator.http.HttpResponse; +import com.sonar.orchestrator.junit4.OrchestratorRule; +import com.sonar.orchestrator.junit4.OrchestratorRuleBuilder; import com.sonar.orchestrator.locator.FileLocation; import java.io.File; @@ -35,12 +35,12 @@ public class ApiDefinitionDownloader { } public static String downloadApiDefinition() { - OrchestratorBuilder builder = Orchestrator.builderEnv() + OrchestratorRuleBuilder builder = OrchestratorRule.builderEnv() .defaultForceAuthentication(); builder.setEdition(COMMUNITY); builder.setZipFile(FileLocation.byWildcardMavenFilename(new File("../sonar-application/build/distributions"), "sonar-application-*.zip").getFile()) .setOrchestratorProperty("orchestrator.workspaceDir", "build"); - Orchestrator orchestrator = builder.setServerProperty("sonar.forceAuthentication", "false") + OrchestratorRule orchestrator = builder.setServerProperty("sonar.forceAuthentication", "false") .build(); orchestrator.start(); -- 2.39.5