@Rule
public ExpectedException thrown = ExpectedException.none();
@Rule
- public TestRule globalTimeout = new DisableOnDebug(Timeout.seconds(900L));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@After
public void stop() {
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.DisableOnDebug;
import org.junit.rules.ExpectedException;
+import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
import org.mockito.Mockito;
import org.sonar.ce.ComputeEngine;
public class CeServerTest {
@Rule
- public Timeout timeout = Timeout.seconds(50);
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public ExpectedException expectedException = ExpectedException.none();
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public TestRule safeGuard = new DisableOnDebug(Timeout.seconds(20));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
private static HazelcastInstance hzCluster;
private static HazelcastClientWrapperImpl hzClient;
import javax.annotation.concurrent.Immutable;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.DisableOnDebug;
+import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
import org.sonar.ce.configuration.CeConfigurationRule;
@Rule
// due to risks of infinite chaining of tasks/futures, a timeout is required for safety
- public Timeout timeout = Timeout.seconds(60);
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public CeConfigurationRule ceConfiguration = new CeConfigurationRule();
// Required to prevent an infinite loop
private static final JavaCommand CE_COMMAND = new JavaCommand(COMPUTE_ENGINE);
@Rule
- public TestRule safeGuard = new DisableOnDebug(Timeout.seconds(30));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public ExpectedException expectedException = ExpectedException.none();
}
// restarting
- verify(appReloader, timeout(10_000)).reload(settings);
+ verify(appReloader, timeout(60_000)).reload(settings);
processLauncher.waitForProcessAlive(ELASTICSEARCH);
processLauncher.waitForProcessAlive(COMPUTE_ENGINE);
processLauncher.waitForProcessAlive(WEB_SERVER);
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public TestRule safeGuard = new DisableOnDebug(Timeout.seconds(10));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Test
public void instantiation_throws_ISE_if_cluster_mode_is_disabled() throws Exception {
public class HazelcastClusterTest {
@Rule
- public TestRule safeGuard = new DisableOnDebug(Timeout.seconds(10));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Rule
- public TestRule safeGuard = new DisableOnDebug(Timeout.seconds(10));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Test
public void initial_state_is_INIT() {
@Rule
public TemporaryFolder temp = new TemporaryFolder();
@Rule
- public TestRule safeGuard = new DisableOnDebug(Timeout.seconds(10));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
private AppSettings settings = mock(AppSettings.class, RETURNS_DEEP_STUBS);
private ProcessCommands commands = mock(ProcessCommands.class);
public class ProcessEntryPointTest {
- SystemExit exit = mock(SystemExit.class);
+ private SystemExit exit = mock(SystemExit.class);
- /**
- * Safeguard
- */
@Rule
- public TestRule timeout = new DisableOnDebug(Timeout.seconds(60));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public TemporaryFolder temp = new TemporaryFolder();
import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.DisableOnDebug;
+import org.junit.rules.TestRule;
import org.junit.rules.Timeout;
import org.sonar.test.TestUtils;
public class ProcessUtilsTest {
@Rule
- public Timeout timeout = Timeout.seconds(5);
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Test
public void private_constructor() {
public class StopWatcherTest {
@Rule
- public TestRule safeguard = new DisableOnDebug(Timeout.seconds(10));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Test
public void stop_if_receive_command() throws Exception {
private static final String A_NODE_NAME = "a_node";
@Rule
- public TestRule timeout = new DisableOnDebug(Timeout.seconds(60));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public TemporaryFolder temp = new TemporaryFolder();
public MockWebServer server = new MockWebServer();
@Rule
- public TestRule timeoutSafeguard = new DisableOnDebug(Timeout.seconds(60));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
private System2 system = new TestSystem2().setNow(NOW);
@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();
@Rule
- public TestRule safeguard = new DisableOnDebug(Timeout.seconds(30));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
private MapSettings settings = new MapSettings();
private System2 system2 = mock(System2.class);
public ExpectedException thrown = ExpectedException.none();
@Rule
- public TestRule timeout = new DisableOnDebug(Timeout.seconds(60));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
private static SocketConnection socketConnection;
private static String baseUrl;
private static final String THREAD_NAME = "progress";
@Rule
- public TestRule timeoutSafeguard = new DisableOnDebug(Timeout.seconds(10));
+ public TestRule safeguardTimeout = new DisableOnDebug(Timeout.seconds(60));
@Rule
public LogTester logTester = new LogTester();