From 0858c3827dead29a8c0d7cceb3e5cae525b29264 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 7 May 2015 18:46:24 +0200 Subject: [PATCH] Throw actual exception --- .../src/test/java/org/sonar/process/StopWatcherTest.java | 4 ++-- .../src/test/java/org/sonar/process/StopperThreadTest.java | 4 ++-- 2 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 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() { -- 2.39.5