]> source.dussan.org Git - sonarqube.git/commitdiff
try to increase sleep period for slow boxes
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 10 Oct 2014 07:15:17 +0000 (09:15 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Fri, 10 Oct 2014 07:15:17 +0000 (09:15 +0200)
server/sonar-server/src/test/java/org/sonar/server/computation/AnalysisReportTaskLauncherTest.java

index 62564671abc16e255c848dbb171ee57bef910533..91dc9daf7ec3e0f5fb33974fe2e5c2ddda388aca 100644 (file)
@@ -49,7 +49,7 @@ public class AnalysisReportTaskLauncherTest {
   }
 
   @Test
-  public void call_findAndBook_when_launching_a_recurrent_task() {
+  public void call_findAndBook_when_launching_a_recurrent_task() throws Exception {
     sut = new AnalysisReportTaskLauncher(service, 0, 1, TimeUnit.MILLISECONDS);
 
     sut.start();
@@ -60,7 +60,7 @@ public class AnalysisReportTaskLauncherTest {
   }
 
   @Test
-  public void call_findAndBook_when_executing_task_immediatly() {
+  public void call_findAndBook_when_executing_task_immediatly() throws Exception {
     sut = new AnalysisReportTaskLauncher(service, 1, 1, TimeUnit.HOURS);
     sut.start();
 
@@ -71,12 +71,7 @@ public class AnalysisReportTaskLauncherTest {
     verify(service, atLeastOnce()).findAndBookNextAvailableAnalysisReport();
   }
 
-  private void sleep() {
-    try {
-      TimeUnit.MILLISECONDS.sleep(50L);
-    } catch (InterruptedException e) {
-      e.printStackTrace();
-    }
+  private void sleep() throws InterruptedException {
+    TimeUnit.MILLISECONDS.sleep(200L);
   }
-
 }