From: David Gageot Date: Thu, 7 May 2015 16:46:24 +0000 (+0200) Subject: Throw actual exception X-Git-Tag: 5.2-RC1~2018 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0858c3827dead29a8c0d7cceb3e5cae525b29264;p=sonarqube.git Throw actual exception --- 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 37b929f0588..d403c0f5e30 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 @@ -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); diff --git a/server/sonar-process/src/test/java/org/sonar/process/StopperThreadTest.java b/server/sonar-process/src/test/java/org/sonar/process/StopperThreadTest.java index c174b3012af..539b29681b7 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/StopperThreadTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/StopperThreadTest.java @@ -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() {