diff --git a/src/test/java/org/redisson/RedissonCountDownLatchConcurrentTest.java b/src/test/java/org/redisson/RedissonCountDownLatchConcurrentTest.java index 96c703fb8..021998135 100644 --- a/src/test/java/org/redisson/RedissonCountDownLatchConcurrentTest.java +++ b/src/test/java/org/redisson/RedissonCountDownLatchConcurrentTest.java @@ -1,15 +1,28 @@ package org.redisson; +import java.io.IOException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.After; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.redisson.core.RCountDownLatch; public class RedissonCountDownLatchConcurrentTest { + + @Before + public void before() throws IOException, InterruptedException { + RedisRunner.startDefaultRedisTestInstance(); + } + + @After + public void after() throws InterruptedException { + RedisRunner.shutDownDefaultRedisTestInstance(); + } @Test public void testSingleCountDownAwait_SingleInstance() throws InterruptedException { diff --git a/src/test/java/org/redisson/RedissonTest.java b/src/test/java/org/redisson/RedissonTest.java index c4269972c..1e2f53802 100644 --- a/src/test/java/org/redisson/RedissonTest.java +++ b/src/test/java/org/redisson/RedissonTest.java @@ -10,9 +10,11 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; +import org.junit.After; import org.junit.Assert; import org.junit.Assume; +import org.junit.Before; import org.junit.Test; import org.redisson.RedisRunner.RedisProcess; import org.redisson.client.RedisConnectionException; @@ -28,6 +30,16 @@ public class RedissonTest { RedissonClient redisson; + @Before + public void before() throws IOException, InterruptedException { + RedisRunner.startDefaultRedisTestInstance(); + } + + @After + public void after() throws InterruptedException { + RedisRunner.shutDownDefaultRedisTestInstance(); + } + public static class Dummy { private String field; } diff --git a/src/test/java/org/redisson/RedissonTopicPatternTest.java b/src/test/java/org/redisson/RedissonTopicPatternTest.java index e01c85c15..b96078484 100644 --- a/src/test/java/org/redisson/RedissonTopicPatternTest.java +++ b/src/test/java/org/redisson/RedissonTopicPatternTest.java @@ -1,9 +1,12 @@ package org.redisson; +import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.junit.After; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.redisson.core.BasePatternStatusListener; import org.redisson.core.MessageListener; @@ -12,6 +15,16 @@ import org.redisson.core.RPatternTopic; import org.redisson.core.RTopic; public class RedissonTopicPatternTest { + + @Before + public void before() throws IOException, InterruptedException { + RedisRunner.startDefaultRedisTestInstance(); + } + + @After + public void after() throws InterruptedException { + RedisRunner.shutDownDefaultRedisTestInstance(); + } public static class Message { diff --git a/src/test/java/org/redisson/RedissonTopicTest.java b/src/test/java/org/redisson/RedissonTopicTest.java index dd237b6e1..6268a28fe 100644 --- a/src/test/java/org/redisson/RedissonTopicTest.java +++ b/src/test/java/org/redisson/RedissonTopicTest.java @@ -1,10 +1,13 @@ package org.redisson; +import java.io.IOException; import java.io.Serializable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import org.junit.After; import org.junit.Assert; +import org.junit.Before; import org.junit.Test; import org.redisson.core.BaseStatusListener; import org.redisson.core.MessageListener; @@ -12,6 +15,16 @@ import org.redisson.core.RSet; import org.redisson.core.RTopic; 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 {