Fixed testing with travisEnv flag turned off

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

@ -47,16 +47,13 @@ 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);
@ -64,7 +61,6 @@ public class RedissonExecutorServiceTest extends BaseTest {
node = RedissonNode.create(nodeConfig); node = RedissonNode.create(nodeConfig);
node.start(); node.start();
} }
}
@After @After
@Override @Override

@ -50,7 +50,6 @@ 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);
@ -58,16 +57,13 @@ public class RedissonScheduledExecutorServiceTest extends BaseTest {
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
public void testCronExpression() throws InterruptedException, ExecutionException { public void testCronExpression() throws InterruptedException, ExecutionException {

Loading…
Cancel
Save