Skip to content

Commit 49572e7

Browse files
committed
Using only one cache for tests.
1 parent fcf5a1c commit 49572e7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set default behaviour, in case users don't have core.autocrlf set.
2+
* text=auto

src/test/java/org/mybatis/caches/redis/RedisTestCase.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static org.junit.Assert.assertNull;
2121

2222
import org.junit.Before;
23+
import org.junit.BeforeClass;
2324
import org.junit.Test;
2425

2526
/**
@@ -30,10 +31,10 @@ public final class RedisTestCase {
3031
private static final String DEFAULT_ID = "REDIS";
3132

3233
// CacheManager holds any settings between tests
33-
private RedisCache cache;
34+
private static RedisCache cache;
3435

35-
@Before
36-
public void newCache() {
36+
@BeforeClass
37+
public static void newCache() {
3738
cache = new RedisCache(DEFAULT_ID);
3839
}
3940

0 commit comments

Comments
 (0)