File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed
main/java/org/mybatis/caches/redis
test/java/org/mybatis/caches/redis Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ private Object execute(RedisCallback callback) {
49
49
try {
50
50
return callback .doWithRedis (jedis );
51
51
} finally {
52
- pool . returnResource ( jedis );
52
+ jedis . close ( );
53
53
}
54
54
}
55
55
Original file line number Diff line number Diff line change 19
19
import static org .junit .Assert .assertNotNull ;
20
20
import static org .junit .Assert .assertNull ;
21
21
22
- import org .junit .Before ;
23
22
import org .junit .BeforeClass ;
24
23
import org .junit .Test ;
25
24
@@ -30,24 +29,13 @@ public final class RedisTestCase {
30
29
31
30
private static final String DEFAULT_ID = "REDIS" ;
32
31
33
- // CacheManager holds any settings between tests
34
32
private static RedisCache cache ;
35
33
36
34
@ BeforeClass
37
35
public static void newCache () {
38
36
cache = new RedisCache (DEFAULT_ID );
39
37
}
40
38
41
- @ Test
42
- public void shouldDemonstrateHowAllObjectsAreKept () {
43
- for (int i = 0 ; i < 100000 ; i ++) {
44
- cache .putObject (i , i );
45
- assertEquals (i , cache .getObject (i ));
46
- }
47
- // TODO, size does not work
48
- // assertEquals(100000, cache.getSize());
49
- }
50
-
51
39
@ Test
52
40
public void shouldDemonstrateCopiesAreEqual () {
53
41
for (int i = 0 ; i < 1000 ; i ++) {
You can’t perform that action at this time.
0 commit comments