diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-12-03 09:44:59 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-12-03 10:33:17 +0100 |
commit | 54ddd3a2ea84ae6f394f3886266e1692e62a31d5 (patch) | |
tree | a762a9b2ca52848884d38bdb00c7c29715c13147 /it/it-plugins | |
parent | 287fbc9aa4a5f78db7dbb42adf422a632b74fa1e (diff) | |
download | sonarqube-54ddd3a2ea84ae6f394f3886266e1692e62a31d5.tar.gz sonarqube-54ddd3a2ea84ae6f394f3886266e1692e62a31d5.zip |
Try to make IssuesModeTest::concurrent_issue_mode_on_existing_project more robust
Diffstat (limited to 'it/it-plugins')
3 files changed, 31 insertions, 3 deletions
diff --git a/it/it-plugins/batch-plugin/pom.xml b/it/it-plugins/batch-plugin/pom.xml index f7957cbc9a3..c0828f3b125 100644 --- a/it/it-plugins/batch-plugin/pom.xml +++ b/it/it-plugins/batch-plugin/pom.xml @@ -27,7 +27,6 @@ <plugin> <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> <artifactId>sonar-packaging-maven-plugin</artifactId> - <version>1.15</version> <extensions>true</extensions> <configuration> <pluginClass>com.sonarsource.BatchPlugin</pluginClass> diff --git a/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java b/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java index 422e9186a1d..7c4c479c64b 100644 --- a/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java +++ b/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java @@ -10,8 +10,8 @@ public class BatchPlugin extends SonarPlugin { return Arrays.asList( DumpSettingsInitializer.class, RaiseMessageException.class, - TempFolderExtension.class - ); + TempFolderExtension.class, + WaitingSensor.class); } } diff --git a/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/WaitingSensor.java b/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/WaitingSensor.java new file mode 100644 index 00000000000..05196cceace --- /dev/null +++ b/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/WaitingSensor.java @@ -0,0 +1,29 @@ +package com.sonarsource; + +import org.sonar.api.batch.Sensor; +import org.sonar.api.batch.SensorContext; +import org.sonar.api.config.Settings; +import org.sonar.api.resources.Project; + +public class WaitingSensor implements Sensor { + private Settings settings; + + public WaitingSensor(Settings settings) { + this.settings = settings; + } + + @Override + public boolean shouldExecuteOnProject(Project project) { + return settings.getBoolean("sonar.it.enableWaitingSensor"); + } + + @Override + public void analyse(Project module, SensorContext context) { + try { + Thread.sleep(10_000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + +} |