aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-07-13 09:33:53 +0200
committerDavid Gageot <david@gageot.net>2015-07-13 09:33:53 +0200
commitb256fd1a0467a3e50319623305677aff08904d7f (patch)
treeab44ca5fdc6ae5337969f981bfb9fb9c19d33a47 /server/sonar-process
parent45bc4794dfec69b5495de09778ad3eb4081b279d (diff)
downloadsonarqube-b256fd1a0467a3e50319623305677aff08904d7f.tar.gz
sonarqube-b256fd1a0467a3e50319623305677aff08904d7f.zip
The test is still unstable
Diffstat (limited to 'server/sonar-process')
-rw-r--r--server/sonar-process/src/test/java/org/sonar/process/StopWatcherTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-process/src/test/java/org/sonar/process/StopWatcherTest.java b/server/sonar-process/src/test/java/org/sonar/process/StopWatcherTest.java
index 038aff4b046..d6fa7578211 100644
--- a/server/sonar-process/src/test/java/org/sonar/process/StopWatcherTest.java
+++ b/server/sonar-process/src/test/java/org/sonar/process/StopWatcherTest.java
@@ -23,21 +23,21 @@ import org.junit.Test;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class StopWatcherTest {
- @Test(timeout = 1000)
- public void stop_if_receive_command() throws InterruptedException {
+ @Test
+ public void stop_if_receive_command() {
ProcessCommands commands = mock(ProcessCommands.class);
when(commands.askedForStop()).thenReturn(false, true);
Stoppable stoppable = mock(Stoppable.class);
StopWatcher watcher = new StopWatcher(commands, stoppable, 1L);
watcher.start();
- watcher.join();
- verify(stoppable).stopAsync();
+ verify(stoppable, timeout(5000)).stopAsync();
}
@Test(timeout = 5000)