]> source.dussan.org Git - sonarqube.git/commitdiff
Throw actual exception
authorDavid Gageot <david@gageot.net>
Thu, 7 May 2015 16:46:24 +0000 (18:46 +0200)
committerDavid Gageot <david@gageot.net>
Thu, 7 May 2015 16:46:24 +0000 (18:46 +0200)
server/sonar-process/src/test/java/org/sonar/process/StopWatcherTest.java
server/sonar-process/src/test/java/org/sonar/process/StopperThreadTest.java

index 37b929f0588830304008b7bf1a6f8e1aacef4a15..d403c0f5e30fdca605228035b77c9289c53cf014 100644 (file)
@@ -26,7 +26,7 @@ import static org.mockito.Mockito.*;
 public class StopWatcherTest {
 
   @Test(timeout = 1000L)
-  public void stop_if_receive_command() throws Exception {
+  public void stop_if_receive_command() throws InterruptedException {
     ProcessCommands commands = mock(ProcessCommands.class);
     when(commands.askedForStop()).thenReturn(false).thenReturn(true);
     Stoppable stoppable = mock(Stoppable.class);
@@ -39,7 +39,7 @@ public class StopWatcherTest {
   }
 
   @Test(timeout = 1000L)
-  public void stop_watching_on_interruption() throws Exception {
+  public void stop_watching_on_interruption() throws InterruptedException {
     ProcessCommands commands = mock(ProcessCommands.class);
     when(commands.askedForStop()).thenReturn(false);
     Stoppable stoppable = mock(Stoppable.class);
index c174b3012afa49c691f0e5d35368471340c89f85..539b29681b71d28f59dd0ae070cd47c10d88b90a 100644 (file)
@@ -28,7 +28,7 @@ import static org.mockito.Mockito.*;
 public class StopperThreadTest {
 
   @Test(timeout = 3000L)
-  public void stop_in_a_timely_fashion() throws Exception {
+  public void stop_in_a_timely_fashion() throws InterruptedException {
     ProcessCommands commands = mock(ProcessCommands.class);
     Monitored monitored = mock(Monitored.class);
 
@@ -42,7 +42,7 @@ public class StopperThreadTest {
   }
 
   @Test(timeout = 3000L)
-  public void stop_timeout() throws Exception {
+  public void stop_timeout() throws InterruptedException {
     ProcessCommands commands = mock(ProcessCommands.class);
     Monitored monitored = mock(Monitored.class);
     doAnswer(new Answer() {