fix: added missing before and after methods

pull/509/head
Rui Gu 9 years ago
parent 724375b3a4
commit d8189a1338

@ -1,15 +1,28 @@
package org.redisson; package org.redisson;
import java.io.IOException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.redisson.core.RCountDownLatch; import org.redisson.core.RCountDownLatch;
public class RedissonCountDownLatchConcurrentTest { public class RedissonCountDownLatchConcurrentTest {
@Before
public void before() throws IOException, InterruptedException {
RedisRunner.startDefaultRedisTestInstance();
}
@After
public void after() throws InterruptedException {
RedisRunner.shutDownDefaultRedisTestInstance();
}
@Test @Test
public void testSingleCountDownAwait_SingleInstance() throws InterruptedException { public void testSingleCountDownAwait_SingleInstance() throws InterruptedException {

@ -10,9 +10,11 @@ import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Assume; import org.junit.Assume;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.redisson.RedisRunner.RedisProcess; import org.redisson.RedisRunner.RedisProcess;
import org.redisson.client.RedisConnectionException; import org.redisson.client.RedisConnectionException;
@ -28,6 +30,16 @@ public class RedissonTest {
RedissonClient redisson; RedissonClient redisson;
@Before
public void before() throws IOException, InterruptedException {
RedisRunner.startDefaultRedisTestInstance();
}
@After
public void after() throws InterruptedException {
RedisRunner.shutDownDefaultRedisTestInstance();
}
public static class Dummy { public static class Dummy {
private String field; private String field;
} }

@ -1,9 +1,12 @@
package org.redisson; package org.redisson;
import java.io.IOException;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.redisson.core.BasePatternStatusListener; import org.redisson.core.BasePatternStatusListener;
import org.redisson.core.MessageListener; import org.redisson.core.MessageListener;
@ -12,6 +15,16 @@ import org.redisson.core.RPatternTopic;
import org.redisson.core.RTopic; import org.redisson.core.RTopic;
public class RedissonTopicPatternTest { public class RedissonTopicPatternTest {
@Before
public void before() throws IOException, InterruptedException {
RedisRunner.startDefaultRedisTestInstance();
}
@After
public void after() throws InterruptedException {
RedisRunner.shutDownDefaultRedisTestInstance();
}
public static class Message { public static class Message {

@ -1,10 +1,13 @@
package org.redisson; package org.redisson;
import java.io.IOException;
import java.io.Serializable; import java.io.Serializable;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.redisson.core.BaseStatusListener; import org.redisson.core.BaseStatusListener;
import org.redisson.core.MessageListener; import org.redisson.core.MessageListener;
@ -12,6 +15,16 @@ import org.redisson.core.RSet;
import org.redisson.core.RTopic; import org.redisson.core.RTopic;
public class RedissonTopicTest { public class RedissonTopicTest {
@Before
public void before() throws IOException, InterruptedException {
RedisRunner.startDefaultRedisTestInstance();
}
@After
public void after() throws InterruptedException {
RedisRunner.shutDownDefaultRedisTestInstance();
}
public static class Message implements Serializable { public static class Message implements Serializable {

Loading…
Cancel
Save