aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-09-28 18:06:36 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-09-28 18:06:36 +0200
commitfae72d56be0414e34849b36f7b345ec23c87515b (patch)
tree98b5b9f6c7511dfc9fce3759c5c4cb4de3a15b06 /sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java
parent8865c467f7686cc52938b361fcd738a48cab654b (diff)
downloadsonar-scanner-cli-fae72d56be0414e34849b36f7b345ec23c87515b.tar.gz
sonar-scanner-cli-fae72d56be0414e34849b36f7b345ec23c87515b.zip
SONARUNNER-137 Don't prevent aborting process in non interactive mode
Diffstat (limited to 'sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java')
-rw-r--r--sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java25
1 files changed, 11 insertions, 14 deletions
diff --git a/sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java b/sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java
index ec401db..5f739fc 100644
--- a/sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java
+++ b/sonar-runner-cli/src/test/java/org/sonar/runner/cli/ShutdownTest.java
@@ -19,20 +19,17 @@
*/
package org.sonar.runner.cli;
-import static org.mockito.Mockito.verify;
-import static org.fest.assertions.Assertions.assertThat;
-import static com.jayway.awaitility.Awaitility.await;
-
+import com.jayway.awaitility.Duration;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
-
-import com.jayway.awaitility.Duration;
-import org.mockito.MockitoAnnotations;
-import org.sonar.runner.cli.Exit;
-import org.sonar.runner.cli.Shutdown;
-import org.mockito.Mock;
-import org.junit.Test;
import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import static com.jayway.awaitility.Awaitility.await;
+import static org.fest.assertions.Assertions.assertThat;
+import static org.mockito.Mockito.verify;
public class ShutdownTest {
@Mock
@@ -42,7 +39,7 @@ public class ShutdownTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
- shutdown = new Shutdown(exit);
+ shutdown = new Shutdown(exit, true);
}
@Test
@@ -53,7 +50,7 @@ public class ShutdownTest {
@Test(timeout = 60_000)
public void testWaitReady() throws InterruptedException {
- shutdown = new Shutdown(exit, 100_000);
+ shutdown = new Shutdown(exit, true, 100_000);
shutdown.signalReady(false);
assertThat(shutdown.shouldExit()).isFalse();
@@ -75,7 +72,7 @@ public class ShutdownTest {
@Test(timeout = 60_000)
public void testTimeout() throws InterruptedException {
- shutdown = new Shutdown(exit, 0);
+ shutdown = new Shutdown(exit, true, 0);
Thread t = new HookCaller();
t.start();