diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-07-07 15:49:02 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-07-07 15:49:02 +0200 |
commit | deaff9a9e8bf377d84fd8509ea676e7559fb04fc (patch) | |
tree | fd39ca705639ad67adf691a228bd5fac3f46a8f7 /tests | |
parent | e6203dbc6e7e1d8516dc8243afdaf3a7c41270a6 (diff) | |
download | sonarqube-deaff9a9e8bf377d84fd8509ea676e7559fb04fc.tar.gz sonarqube-deaff9a9e8bf377d84fd8509ea676e7559fb04fc.zip |
Fix Java plugin version in UpgradeTest
Diffstat (limited to 'tests')
-rw-r--r-- | tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java index 991ef037cdb..5020202d3dd 100644 --- a/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java +++ b/tests/upgrade/src/test/java/org/sonarsource/sonarqube/upgrade/UpgradeTest.java @@ -52,16 +52,16 @@ public class UpgradeTest { @Test public void test_upgrade_from_4_5_lts() { - testDatabaseUpgrade(Version.create("4.5.1")); + testDatabaseUpgrade(Version.create("4.5.7"), "3.14"); } @Test public void test_upgrade_from_5_2() { - testDatabaseUpgrade(Version.create("5.2")); + testDatabaseUpgrade(Version.create("5.2"), "3.14"); } - private void testDatabaseUpgrade(Version fromVersion, BeforeUpgrade... tasks) { - startServer(fromVersion, false); + private void testDatabaseUpgrade(Version fromVersion, String javaVersion, BeforeUpgrade... tasks) { + startServer(fromVersion, javaVersion, false); scanProject(); int files = countFiles(PROJECT_KEY); assertThat(files).isGreaterThan(0); @@ -72,7 +72,7 @@ public class UpgradeTest { stopServer(); // latest version - startServer(Version.create(Orchestrator.builderEnv().getSonarVersion()), true); + startServer(Version.create(Orchestrator.builderEnv().getSonarVersion()), "LATEST_RELEASE", true); checkSystemStatus(ServerStatusResponse.Status.DB_MIGRATION_NEEDED); upgradeDatabase(); checkSystemStatus(ServerStatusResponse.Status.UP); @@ -108,7 +108,7 @@ public class UpgradeTest { assertThat(serverMigrationResponse.getStatus()).isEqualTo(ServerMigrationResponse.Status.MIGRATION_SUCCEEDED); } - private void startServer(Version sqVersion, boolean keepDatabase) { + private void startServer(Version sqVersion, String javaVersion, boolean keepDatabase) { String jdbcUrl = MssqlConfig.fixUrl(Configuration.createEnv(), sqVersion); OrchestratorBuilder builder = Orchestrator.builderEnv() .setOrchestratorProperty("sonar.jdbc.url", jdbcUrl) @@ -117,7 +117,7 @@ public class UpgradeTest { if (!keepDatabase) { builder.restoreProfileAtStartup(FileLocation.ofClasspath("/sonar-way-5.1.xml")); } - builder.setOrchestratorProperty("javaVersion", "OLDEST_COMPATIBLE").addPlugin("java"); + builder.setOrchestratorProperty("javaVersion", javaVersion).addPlugin("java"); orchestrator = builder.build(); orchestrator.start(); } |