Fixed testing with travisEnv flag turned off

pull/626/head
jackygurui 8 years ago
parent aa3fd71bdb
commit 382ad73c11

@ -47,23 +47,19 @@ public class RedissonExecutorServiceTest extends BaseTest {
@AfterClass @AfterClass
public static void afterClass() throws IOException, InterruptedException { public static void afterClass() throws IOException, InterruptedException {
if (!RedissonRuntimeEnvironment.isTravis) { BaseTest.afterClass();
BaseTest.afterClass(); node.shutdown();
node.shutdown();
}
} }
@Before @Before
@Override @Override
public void before() throws IOException, InterruptedException { public void before() throws IOException, InterruptedException {
if (RedissonRuntimeEnvironment.isTravis) { super.before();
super.before(); Config config = createConfig();
Config config = createConfig(); RedissonNodeConfig nodeConfig = new RedissonNodeConfig(config);
RedissonNodeConfig nodeConfig = new RedissonNodeConfig(config); nodeConfig.setExecutorServiceWorkers(Collections.singletonMap("test", 1));
nodeConfig.setExecutorServiceWorkers(Collections.singletonMap("test", 1)); node = RedissonNode.create(nodeConfig);
node = RedissonNode.create(nodeConfig); node.start();
node.start();
}
} }
@After @After

@ -50,23 +50,19 @@ public class RedissonScheduledExecutorServiceTest extends BaseTest {
@Before @Before
@Override @Override
public void before() throws IOException, InterruptedException { public void before() throws IOException, InterruptedException {
if (RedissonRuntimeEnvironment.isTravis) { super.before();
super.before(); Config config = createConfig();
Config config = createConfig(); RedissonNodeConfig nodeConfig = new RedissonNodeConfig(config);
RedissonNodeConfig nodeConfig = new RedissonNodeConfig(config); nodeConfig.setExecutorServiceWorkers(Collections.singletonMap("test", 1));
nodeConfig.setExecutorServiceWorkers(Collections.singletonMap("test", 1)); node = RedissonNode.create(nodeConfig);
node = RedissonNode.create(nodeConfig); node.start();
node.start();
}
} }
@After @After
@Override @Override
public void after() throws InterruptedException { public void after() throws InterruptedException {
if (RedissonRuntimeEnvironment.isTravis) { super.after();
super.after(); node.shutdown();
node.shutdown();
}
} }
@Test @Test

Loading…
Cancel
Save