]> source.dussan.org Git - sonarqube.git/commitdiff
Drop calls to Dev Update Center from integration tests
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 4 Apr 2018 11:33:54 +0000 (13:33 +0200)
committerSonarTech <sonartech@sonarsource.com>
Thu, 5 Apr 2018 18:20:48 +0000 (20:20 +0200)
12 files changed:
build.gradle
tests/projects/plugins/project/src/go/sample.go [new file with mode: 0644]
tests/src/test/java/org/sonarqube/tests/Category3Suite.java
tests/src/test/java/org/sonarqube/tests/analysis/IssuesModeTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueCreationDatePluginChangedTest.java
tests/src/test/java/org/sonarqube/tests/performance/scanner/ScannerPerformanceSuite.java
tests/src/test/java/org/sonarqube/tests/plugins/PluginsTest.java
tests/src/test/java/org/sonarqube/tests/plugins/checks/GoCheck.java [new file with mode: 0644]
tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java
tests/src/test/java/org/sonarqube/tests/rule/RuleReKeyingTest.java
tests/src/test/java/org/sonarqube/tests/source/SourceSuite.java
tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java

index 6b4311b54fb9c56a09850ed1e36eaccbdf781440..9dd6dc7b3696f890223abee21ba9b5632361caa9 100644 (file)
@@ -203,7 +203,7 @@ subprojects {
       dependency 'org.postgresql:postgresql:42.2.1'
       dependency 'org.reflections:reflections:0.9.9'
       dependency 'org.simpleframework:simple:4.1.21'
-      dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.16.1.1446'
+      dependency 'org.sonarsource.orchestrator:sonar-orchestrator:3.17.0.1491'
       dependency('org.sonarsource:sonar-persistit:3.3.2') {
         exclude 'commons-logging:commons-logging'
       }
diff --git a/tests/projects/plugins/project/src/go/sample.go b/tests/projects/plugins/project/src/go/sample.go
new file mode 100644 (file)
index 0000000..ff9d051
--- /dev/null
@@ -0,0 +1,43 @@
+package main
+
+import "fmt"
+
+func f(from string) {
+    for i := 0; i < 3; i++ {
+        fmt.Println(from, ":", i)
+    }
+}
+
+func identicalIfConditions(cond bool)  {
+       if cond {
+
+       } else if cond {
+
+       }
+}
+
+func main() {
+
+    // Suppose we have a function call `f(s)`. Here's how
+    // we'd call that in the usual way, running it
+    // synchronously.
+    f("direct")
+
+    // To invoke this function in a goroutine, use
+    // `go f(s)`. This new goroutine will execute
+    // concurrently with the calling one.
+    go f("goroutine")
+
+    // You can also start a goroutine for an anonymous
+    // function call.
+    go func(msg string) {
+        fmt.Println(msg)
+    }("going")
+
+    // Our two function calls are running asynchronously in
+    // separate goroutines now, so execution falls through
+    // to here. This `Scanln` requires we press a key
+    // before the program exits.
+    fmt.Scanln()
+    fmt.Println("done")
+}
index 3a59293a07a37c902c1fea1d389f407e5a2aeb25..912aab2381f9790a199ff7f3252528e635a2ef15 100644 (file)
@@ -20,6 +20,7 @@
 package org.sonarqube.tests;
 
 import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.locator.MavenLocation;
 import org.junit.ClassRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
@@ -38,7 +39,6 @@ import org.sonarqube.tests.analysis.ScannerTest;
 import org.sonarqube.tests.analysis.SettingsEncryptionTest;
 import org.sonarqube.tests.analysis.TempFolderTest;
 import org.sonarqube.tests.plugins.VersionPluginTest;
-import org.sonarqube.tests.webhook.WebhooksTest;
 
 import static util.ItUtils.newOrchestratorBuilder;
 import static util.ItUtils.pluginArtifact;
@@ -73,7 +73,7 @@ public class Category3Suite {
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
     .addPlugin(xooPlugin())
-    .setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
+    .addPlugin(MavenLocation.of("org.sonarsource.java", "sonar-java-plugin", "LATEST_RELEASE"))
 
     // Used by SettingsEncryptionTest
     .addPlugin(pluginArtifact("settings-encryption-plugin"))
index 8479fc8d2a8174f63d8c0cc21095af0bd1907bf0..48e8f4432e61b798c49515b3d4db4df7554f8048 100644 (file)
@@ -26,6 +26,7 @@ import com.sonar.orchestrator.build.BuildResult;
 import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.build.SonarScannerInstaller;
 import com.sonar.orchestrator.config.FileSystem;
+import com.sonar.orchestrator.locator.Locators;
 import com.sonar.orchestrator.version.Version;
 import java.io.File;
 import java.io.IOException;
@@ -388,7 +389,8 @@ public class IssuesModeTest {
   private void runConcurrentIssues(final String workDirPath) throws Exception {
     // Install sonar-runner in advance to avoid concurrent unzip issues
     FileSystem fileSystem = orchestrator.getConfiguration().fileSystem();
-    new SonarScannerInstaller(fileSystem).install(Version.create(SonarScanner.DEFAULT_SCANNER_VERSION), fileSystem.workspace(), true);
+    Locators locators = orchestrator.getConfiguration().locators();
+    new SonarScannerInstaller(locators).install(Version.create(SonarScanner.DEFAULT_SCANNER_VERSION), fileSystem.workspace(), true);
     final int nThreads = 3;
     ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
     List<Callable<BuildResult>> tasks = new ArrayList<>();
index 76ae03a0a8b57979dad744ffdf205725d58d2f11..c085dfa1f727d85e634efccd56d211b404f5fa82 100644 (file)
@@ -143,7 +143,7 @@ public class IssueCreationDatePluginChangedTest {
     ItUtils.newAdminWsClient(ORCHESTRATOR).wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "backdating")).failIfNotSuccessful();
     // install plugin V2
     File pluginsDir = new File(ORCHESTRATOR.getServer().getHome() + "/extensions/plugins");
-    ORCHESTRATOR.getConfiguration().fileSystem().copyToDirectory(pluginArtifact("backdating-plugin-v2"), pluginsDir);
+    ORCHESTRATOR.getConfiguration().locators().copyToDirectory(pluginArtifact("backdating-plugin-v2"), pluginsDir);
 
     ORCHESTRATOR.restartServer();
 
index 918cb4ba7a6fdbeb651d320447f20c916f2598aa..24eab925762c1cae8351e1618b614ed96ed605e6 100644 (file)
@@ -21,8 +21,7 @@ package org.sonarqube.tests.performance.scanner;
 
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.locator.FileLocation;
-import java.io.File;
-import java.io.IOException;
+import com.sonar.orchestrator.locator.MavenLocation;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
 import org.junit.runner.RunWith;
@@ -49,7 +48,7 @@ public class ScannerPerformanceSuite {
     // should not be so high, but required as long embedded h2 is used -> requires more memory on server
     .setServerProperty("sonar.web.javaOpts", "-Xmx1G -XX:+HeapDumpOnOutOfMemoryError")
     // Needed by DuplicationTest::hugeJavaFile
-    .setOrchestratorProperty("javaVersion", "LATEST_RELEASE").addPlugin("java")
+    .addPlugin(MavenLocation.of("org.sonarsource.java", "sonar-java-plugin", "LATEST_RELEASE"))
     .restoreProfileAtStartup(FileLocation.ofClasspath("/one-xoo-issue-per-line.xml"))
     .build();
 
index bcde9c81ca28f3538922f97ebc29d38e80e10cf7..2dffe968d4e12adc17ed3e17a7f2ec7bcb5a4c26 100644 (file)
@@ -24,6 +24,9 @@ import com.sonar.orchestrator.OrchestratorBuilder;
 import com.sonar.orchestrator.build.BuildResult;
 import com.sonar.orchestrator.build.SonarScanner;
 import com.sonar.orchestrator.locator.MavenLocation;
+import com.sonar.orchestrator.locator.URLLocation;
+import java.net.MalformedURLException;
+import java.net.URL;
 import java.util.Arrays;
 import java.util.List;
 import org.junit.BeforeClass;
@@ -36,6 +39,7 @@ import org.sonarqube.tests.plugins.checks.Check;
 import org.sonarqube.tests.plugins.checks.CobolCheck;
 import org.sonarqube.tests.plugins.checks.CppCheck;
 import org.sonarqube.tests.plugins.checks.FlexCheck;
+import org.sonarqube.tests.plugins.checks.GoCheck;
 import org.sonarqube.tests.plugins.checks.GroovyCheck;
 import org.sonarqube.tests.plugins.checks.JavaCheck;
 import org.sonarqube.tests.plugins.checks.JavascriptCheck;
@@ -61,9 +65,8 @@ public class PluginsTest {
     new AbapCheck(),
     new CCheck(), new CppCheck(),
     new CobolCheck(),
-    // FIXME css plugin is temporary disabled as for the moment incompatible with the web plugin
-    // new CssCheck(),
     new FlexCheck(),
+    new GoCheck(),
     new GroovyCheck(),
     new JavaCheck(),
     new JavascriptCheck(),
@@ -73,82 +76,50 @@ public class PluginsTest {
     new PythonCheck(),
     new RpgCheck(),
     new SwiftCheck(),
-    // SONAR-7618 Visual Basic 2.2 not compatible with CE not loading @ServerSide
-    // new VbCheck(),
     new WebCheck());
 
   private static Orchestrator ORCHESTRATOR;
 
   @BeforeClass
-  public static void startServer() {
+  public static void startServer() throws MalformedURLException {
     OrchestratorBuilder builder = newOrchestratorBuilder();
 
-    builder.addPlugin(MavenLocation.of("com.sonarsource.license", "sonar-dev-license-plugin", "3.2.0.1163"));
+    installPlugin(builder, "com.sonarsource.abap", "sonar-abap-plugin");
+    installPlugin(builder, "org.codehaus.sonar-plugins.android", "sonar-android-plugin");
+    installPlugin(builder, "org.sonarsource.auth.bitbucket", "sonar-auth-bitbucket-plugin");
+    installPlugin(builder, "org.sonarsource.auth.github", "sonar-auth-github-plugin");
+    installPlugin(builder, "org.sonarsource.clover", "sonar-clover-plugin");
+    installPlugin(builder, "com.sonarsource.cobol", "sonar-cobol-plugin");
+    installPlugin(builder, "com.sonarsource.cpp", "sonar-cfamily-plugin");
+    installPlugin(builder, "org.sonarsource.dotnet", "sonar-csharp-plugin");
+    installPlugin(builder, "org.sonarsource.sonar-findbugs-plugin", "sonar-findbugs-plugin");
+    installPlugin(builder, "org.sonarsource.flex", "sonar-flex-plugin");
+    installPlugin(builder, "org.sonarsource.sonar-plugins.github", "sonar-github-plugin");
+    installPlugin(builder, "org.sonarsource.go", "sonar-go-plugin");
+    installPlugin(builder, "org.sonarsource.groovy", "sonar-groovy-plugin");
+    installPlugin(builder, "org.sonarsource.java", "sonar-java-plugin");
+    installPlugin(builder, "org.sonarsource.javascript", "sonar-javascript-plugin");
+    installPlugin(builder, "org.sonarsource.ldap", "sonar-ldap-plugin");
+    installPlugin(builder, "org.sonarsource.php", "sonar-php-plugin");
+    installPlugin(builder, "com.sonarsource.pli", "sonar-pli-plugin");
+    installPlugin(builder, "com.sonarsource.plsql", "sonar-plsql-plugin");
+    installPlugin(builder, "org.sonarsource.pmd", "sonar-pmd-plugin");
+    installPlugin(builder, "org.sonarsource.python", "sonar-python-plugin");
+    installPlugin(builder, "com.sonarsource.rpg", "sonar-rpg-plugin");
+    builder.addPlugin(URLLocation.create(new URL("https://sonarsource.bintray.com/Distribution/sonar-scm-clearcase-plugin/sonar-scm-clearcase-plugin-1.1.jar")));
+    installPlugin(builder, "org.codehaus.sonar-plugins", "sonar-scm-cvs-plugin");
+    installPlugin(builder, "org.sonarsource.scm.git", "sonar-scm-git-plugin");
+    builder.addPlugin(URLLocation.create(new URL("http://downloads.sonarsource.com/plugins/org/codehaus/sonar-plugins/sonar-scm-jazzrtc-plugin/1.1/sonar-scm-jazzrtc-plugin-1.1.jar")));
+    installPlugin(builder, "org.sonarsource.scm.mercurial", "sonar-scm-mercurial-plugin");
+    installPlugin(builder, "org.sonarsource.scm.perforce", "sonar-scm-perforce-plugin");
+    installPlugin(builder, "org.sonarsource.scm.svn", "sonar-scm-svn-plugin");
+    installPlugin(builder, "com.sonarsource.swift", "sonar-swift-plugin");
+    installPlugin(builder, "com.sonarsource.vbnet", "sonar-vbnet-plugin");
+    installPlugin(builder, "org.sonarsource.web", "sonar-web-plugin");
+    installPlugin(builder, "org.sonarsource.xml", "sonar-xml-plugin");
+    installPlugin(builder, "com.sonarsource.license", "sonar-dev-license-plugin");
 
-    // FIXME JSON plugin is temporarily disabled as for the moment the github repo doesn't exist anymore installPlugin(builder, "JSON");;
-    installPlugin(builder, "Sonargraph");
-    installPlugin(builder, "abap");
-    // FIXME AEM Rules plugin is disabled because it is no more compatible with SonarQube 6.4 (ClassNotFoundException: com.google.common.base.Functions) installPlugin(builder, "aemrules");
-    installPlugin(builder, "android");
-    installPlugin(builder, "authbitbucket");
-    installPlugin(builder, "authgithub");
-    installPlugin(builder, "checkstyle");
-    installPlugin(builder, "clover");
-    installPlugin(builder, "cobol");
-    installPlugin(builder, "codecrackercsharp");
-    installPlugin(builder, "cpp");
-    installPlugin(builder, "csharp");
-    // FIXME css plugin is temporarily disabled as for the moment incompatible with the web plugin installPlugin(builder, "css");
-    // FIXME erlang plugin is temporarily disabled because it is not compatible with SQ 6.4 until usage of Colorizer API is removed
-    // FIXME findbugs plugin is temporarily disabled because it is not compatible with SQ 6.4 until usage of Colorizer API is removed
-    installPlugin(builder, "flex");
-    installPlugin(builder, "github");
-    installPlugin(builder, "googleanalytics");
-    installPlugin(builder, "groovy");
-    installPlugin(builder, "java");
-    // FIXME javaProperties plugin is temporarily disabled as for the moment the github repo doesn't exist anymore installPlugin(builder, "javaProperties");
-    installPlugin(builder, "javascript");
-    installPlugin(builder, "jdepend");
-    installPlugin(builder, "l10nde");
-    installPlugin(builder, "l10nel");
-    installPlugin(builder, "l10nes");
-    installPlugin(builder, "l10nfr");
-    installPlugin(builder, "l10nit");
-    installPlugin(builder, "l10nja");
-    installPlugin(builder, "l10nko");
-    installPlugin(builder, "l10npt");
-    installPlugin(builder, "l10nru");
-    installPlugin(builder, "l10nzh");
-    installPlugin(builder, "ldap");
-    installPlugin(builder, "lua");
-    installPlugin(builder, "php");
-    installPlugin(builder, "pitest");
-    installPlugin(builder, "pli");
-    installPlugin(builder, "plsql");
-    installPlugin(builder, "pmd");
-    // FIXME puppet plugin is temporarily disabled because it is not compatible with SQ 6.4 until usage of Colorizer API is removed
-    installPlugin(builder, "python");
-    installPlugin(builder, "rci");
-    installPlugin(builder, "rpg");
-    installPlugin(builder, "scmclearcase");
-    installPlugin(builder, "scmcvs");
-    installPlugin(builder, "scmgit");
-    installPlugin(builder, "scmjazzrtc");
-    installPlugin(builder, "scmmercurial");
-    installPlugin(builder, "scmperforce");
-    installPlugin(builder, "scmsvn");
-    installPlugin(builder, "scmtfvc");
-    installPlugin(builder, "softvis3d");
-    installPlugin(builder, "sonargraphintegration");
-    installPlugin(builder, "status");
-    installPlugin(builder, "swift");
-    // SONAR-7618 Visual Basic 2.2 not compatible with CE not loading @ServerSide installPlugin(builder, "vb");
-    installPlugin(builder, "vbnet");
-    installPlugin(builder, "web");
-    installPlugin(builder, "xanitizer");
-    installPlugin(builder, "xml");
-
-    activateLicenses(builder);
+    builder.activateLicense();
     ORCHESTRATOR = builder.build();
     ORCHESTRATOR.start();
   }
@@ -187,12 +158,7 @@ public class PluginsTest {
     return analysis;
   }
 
-  private static void activateLicenses(OrchestratorBuilder builder) {
-    builder.activateLicense();
-  }
-
-  private static void installPlugin(OrchestratorBuilder builder, String pluginKey) {
-    builder.setOrchestratorProperty(pluginKey + "Version", "LATEST_RELEASE");
-    builder.addPlugin(pluginKey);
+  private static void installPlugin(OrchestratorBuilder builder, String groupId, String artifactId) {
+    builder.addPlugin(MavenLocation.of(groupId, artifactId, "LATEST_RELEASE"));
   }
 }
diff --git a/tests/src/test/java/org/sonarqube/tests/plugins/checks/GoCheck.java b/tests/src/test/java/org/sonarqube/tests/plugins/checks/GoCheck.java
new file mode 100644 (file)
index 0000000..fb33cd0
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+package org.sonarqube.tests.plugins.checks;
+
+public class GoCheck implements Check {
+
+  public static final String DIR = "src/go";
+
+  @Override
+  public void validate(Validation validation) {
+    validation.mustHaveNonEmptySource(DIR);
+    validation.mustHaveSize(DIR);
+    validation.mustHaveComments(DIR);
+    validation.mustHaveComplexity(DIR);
+    validation.mustHaveIssues(DIR + "/sample.go");
+  }
+}
index 861beecbe5319ad3a0a063fdd51207545928b355..91b687b2d949848207e0d4664db4b5c18887eb29 100644 (file)
@@ -118,7 +118,7 @@ public class BuiltInQualityProfilesNotificationTest {
     wsClient.wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "foo")).failIfNotSuccessful();
     // install plugin V2
     File pluginsDir = new File(orchestrator.getServer().getHome() + "/extensions/plugins");
-    orchestrator.getConfiguration().fileSystem().copyToDirectory(pluginArtifact("foo-plugin-v2"), pluginsDir);
+    orchestrator.getConfiguration().locators().copyToDirectory(pluginArtifact("foo-plugin-v2"), pluginsDir);
 
     orchestrator.restartServer();
 
@@ -147,7 +147,7 @@ public class BuiltInQualityProfilesNotificationTest {
     // uninstall plugin V2
     wsClient.wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "foo")).failIfNotSuccessful();
     // install plugin V1
-    orchestrator.getConfiguration().fileSystem().copyToDirectory(pluginArtifact("foo-plugin-v1"), pluginsDir);
+    orchestrator.getConfiguration().locators().copyToDirectory(pluginArtifact("foo-plugin-v1"), pluginsDir);
 
     orchestrator.restartServer();
 
@@ -191,7 +191,7 @@ public class BuiltInQualityProfilesNotificationTest {
     wsClient.wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "foo")).failIfNotSuccessful();
     // install plugin V2
     File pluginsDir = new File(orchestrator.getServer().getHome() + "/extensions/plugins");
-    orchestrator.getConfiguration().fileSystem().copyToDirectory(pluginArtifact("foo-plugin-v2"), pluginsDir);
+    orchestrator.getConfiguration().locators().copyToDirectory(pluginArtifact("foo-plugin-v2"), pluginsDir);
 
     orchestrator.restartServer();
 
index 6576d0ec92442bd75318d22663778bf9fedd5946..db88a57a092a2ada920dbc000aba42d0c0be8d22 100644 (file)
@@ -95,7 +95,7 @@ public class RuleReKeyingTest {
     tester.wsClient().wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "foo")).failIfNotSuccessful();
     // install plugin V2
     File pluginsDir = new File(orchestrator.getServer().getHome() + "/extensions/plugins");
-    orchestrator.getConfiguration().fileSystem().copyToDirectory(pluginArtifact("foo-plugin-v2"), pluginsDir);
+    orchestrator.getConfiguration().locators().copyToDirectory(pluginArtifact("foo-plugin-v2"), pluginsDir);
 
     orchestrator.restartServer();
 
@@ -128,7 +128,7 @@ public class RuleReKeyingTest {
     // uninstall plugin V2
     tester.wsClient().wsConnector().call(new PostRequest("api/plugins/uninstall").setParam("key", "foo")).failIfNotSuccessful();
     // install plugin V1
-    orchestrator.getConfiguration().fileSystem().copyToDirectory(pluginArtifact("foo-plugin-v1"), pluginsDir);
+    orchestrator.getConfiguration().locators().copyToDirectory(pluginArtifact("foo-plugin-v1"), pluginsDir);
 
     orchestrator.restartServer();
 
index 070a0fc941e0b63c32eb3f57e02ae515cedeaa1e..11b0f7f8a6d12e76f7d8b3a29d2822ba766fdf00 100644 (file)
@@ -20,6 +20,7 @@
 package org.sonarqube.tests.source;
 
 import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.locator.MavenLocation;
 import org.junit.ClassRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
@@ -39,9 +40,8 @@ public class SourceSuite {
 
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = newOrchestratorBuilder()
-    .setOrchestratorProperty("scmgitVersion", "LATEST_RELEASE")
     .addPlugin(xooPlugin())
-    .addPlugin("scmgit")
+    .addPlugin(MavenLocation.of("org.sonarsource.scm.git", "sonar-scm-git-plugin", "LATEST_RELEASE"))
     .build();
 
 }
index 8d79898aa13c4b342ee604830c8e0011414a9d53..ac2d248db738c10a8a56a29bc0dd65e7318863b7 100644 (file)
@@ -58,7 +58,6 @@ import static util.ItUtils.newOrchestratorBuilder;
 public class UpgradeTest {
 
   private static final String PROJECT_KEY = "org.apache.struts:struts-parent";
-  private static final String LATEST_JAVA_RELEASE = "LATEST_RELEASE";
   private static final Version DEV_VERSION = Version.create("DEV");
 
   private Orchestrator orchestrator;
@@ -165,8 +164,7 @@ public class UpgradeTest {
   private void startAndUpgradeDevServer() {
     OrchestratorBuilder builder = newOrchestratorBuilder()
       .setOrchestratorProperty("orchestrator.keepDatabase", "true")
-      .setOrchestratorProperty("javaVersion", LATEST_JAVA_RELEASE)
-      .addPlugin("java")
+      .addPlugin(MavenLocation.of("org.sonarsource.java", "sonar-java-plugin", "LATEST_RELEASE"))
       .setStartupLogWatcher(log -> log.contains("Database must be upgraded"));
     orchestrator = builder.build();
     orchestrator.start();