aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--it/it-tests/src/test/java/it/plugins/PluginsTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/it/it-tests/src/test/java/it/plugins/PluginsTest.java b/it/it-tests/src/test/java/it/plugins/PluginsTest.java
index 3f6e038b64d..e819b338f38 100644
--- a/it/it-tests/src/test/java/it/plugins/PluginsTest.java
+++ b/it/it-tests/src/test/java/it/plugins/PluginsTest.java
@@ -51,6 +51,7 @@ import org.junit.Test;
import org.junit.rules.ErrorCollector;
import org.sonar.updatecenter.common.Plugin;
import org.sonar.updatecenter.common.Release;
+import org.sonar.updatecenter.common.Version;
import static org.assertj.core.api.Assertions.fail;
@@ -97,10 +98,11 @@ public class PluginsTest {
// install latest compatible releases of plugins
org.sonar.updatecenter.common.Version sonarVersion = org.sonar.updatecenter.common.Version.create(builder.getSonarVersion());
- builder.getUpdateCenter().setInstalledSonarVersion(sonarVersion);
+ Version sonarVersionWithoutPatch = Version.create(sonarVersion.getMajor() + "." + sonarVersion.getMinor());
+ builder.getUpdateCenter().setInstalledSonarVersion(sonarVersionWithoutPatch);
for (Plugin plugin : builder.getUpdateCenter().findAllCompatiblePlugins()) {
if (!DISABLED_PLUGINS.contains(plugin.getKey())) {
- Release release = plugin.getLastCompatibleRelease(sonarVersion);
+ Release release = plugin.getLastCompatibleRelease(sonarVersionWithoutPatch);
if (release != null) {
builder.setOrchestratorProperty(plugin.getKey() + "Version", release.getVersion().toString());
builder.addPlugin(plugin.getKey());