diff options
6 files changed, 15 insertions, 7 deletions
@@ -1009,7 +1009,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.11</version> + <version>4.12</version> </dependency> <dependency> <groupId>xmlunit</groupId> @@ -1044,7 +1044,7 @@ <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> - <version>0.9.9-RC1</version> + <version>0.9.9</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> diff --git a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java index 7734843c3d8..289b371c46c 100644 --- a/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java +++ b/server/sonar-process-monitor/src/test/java/org/sonar/process/monitor/MonitorTest.java @@ -74,7 +74,7 @@ public class MonitorTest { * Safeguard */ @Rule - public Timeout globalTimeout = new Timeout(30000); + public Timeout globalTimeout = Timeout.seconds(30); /** * Temporary directory is used to interact with monitored processes, which write in it. diff --git a/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java b/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java index 9560c3c7f38..e24f51b62e1 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/ProcessEntryPointTest.java @@ -22,7 +22,9 @@ package org.sonar.process; import org.apache.commons.io.FileUtils; import org.junit.Rule; import org.junit.Test; +import org.junit.rules.DisableOnDebug; import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; import org.junit.rules.Timeout; import org.sonar.process.Lifecycle.State; import org.sonar.process.test.StandardProcess; @@ -42,7 +44,7 @@ public class ProcessEntryPointTest { * Safeguard */ @Rule - public Timeout timeout = new Timeout(10000); + public TestRule timeout = new DisableOnDebug(Timeout.seconds(10)); @Rule public TemporaryFolder temp = new TemporaryFolder(); diff --git a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java index 969137e97ab..f2be9704667 100644 --- a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java +++ b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java @@ -29,7 +29,9 @@ import org.elasticsearch.common.transport.InetSocketTransportAddress; import org.junit.After; import org.junit.Rule; import org.junit.Test; +import org.junit.rules.DisableOnDebug; import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; import org.junit.rules.Timeout; import org.sonar.process.NetworkUtils; import org.sonar.process.ProcessConstants; @@ -48,7 +50,7 @@ public class SearchServerTest { Client client; @Rule - public Timeout timeout = new Timeout(60000); + public TestRule timeout = new DisableOnDebug(Timeout.seconds(60)); @Rule public TemporaryFolder temp = new TemporaryFolder(); diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportTaskLauncherTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportTaskLauncherTest.java index 4d32dac4ca4..9e79a7288dd 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportTaskLauncherTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportTaskLauncherTest.java @@ -24,6 +24,8 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.junit.rules.DisableOnDebug; +import org.junit.rules.TestRule; import org.junit.rules.Timeout; import org.sonar.api.platform.Server; @@ -34,7 +36,7 @@ import static org.mockito.Mockito.*; public class AnalysisReportTaskLauncherTest { @Rule - public Timeout timeout = new Timeout(5000); + public TestRule timeout = new DisableOnDebug(Timeout.seconds(5)); private AnalysisReportTaskLauncher sut; private ComputationService service; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java index fa9d2edc866..3c7cbf1acec 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/HttpDownloaderTest.java @@ -26,8 +26,10 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; +import org.junit.rules.DisableOnDebug; import org.junit.rules.ExpectedException; import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestRule; import org.junit.rules.Timeout; import org.simpleframework.http.Request; import org.simpleframework.http.Response; @@ -64,7 +66,7 @@ public class HttpDownloaderTest { public ExpectedException thrown = ExpectedException.none(); @Rule - public Timeout timeout = new Timeout(2000); + public TestRule timeout = new DisableOnDebug(Timeout.seconds(2)); private static SocketConnection socketConnection; private static String baseUrl; |