@@ -43,7 +43,7 @@ public void flushAllTest() {
43
43
control .set ("k" + i , "v" + i );
44
44
}
45
45
46
- try (JedisPooled jedis = new JedisPooled (hnp , clientConfig .get (), CacheConfig .builder ().maxSize ( 1000 ). build ())) {
46
+ try (JedisPooled jedis = new JedisPooled (hnp , clientConfig .get (), CacheConfig .builder ().build ())) {
47
47
Cache cache = jedis .getCache ();
48
48
for (int i = 0 ; i < count ; i ++) {
49
49
jedis .get ("k" + i );
@@ -92,7 +92,7 @@ public void lruEvictionTest() {
92
92
93
93
@ Test // T.5.2
94
94
public void deleteByKeyUsingMGetTest () {
95
- try (JedisPooled jedis = new JedisPooled (hnp , clientConfig .get (), CacheConfig .builder ().maxSize ( 1000 ). build ())) {
95
+ try (JedisPooled jedis = new JedisPooled (hnp , clientConfig .get (), CacheConfig .builder ().build ())) {
96
96
Cache clientSideCache = jedis .getCache ();
97
97
98
98
jedis .set ("1" , "one" );
@@ -243,8 +243,7 @@ public void maximumSizeExact() {
243
243
public void testInvalidationWithUnifiedJedis () {
244
244
Cache cache = new TestCache ();
245
245
Cache mock = Mockito .spy (cache );
246
- UnifiedJedis client = new UnifiedJedis (hnp , clientConfig .get (), mock ) {
247
- };
246
+ UnifiedJedis client = new UnifiedJedis (hnp , clientConfig .get (), mock );
248
247
UnifiedJedis controlClient = new UnifiedJedis (hnp , clientConfig .get ());
249
248
250
249
try {
@@ -272,7 +271,7 @@ public void testInvalidationWithUnifiedJedis() {
272
271
public void differentInstanceOnEachCacheHit () {
273
272
274
273
// fill the cache for maxSize
275
- try (JedisPooled jedis = new JedisPooled (hnp , clientConfig .get (), CacheConfig .builder ().maxSize ( 1000 ). build ())) {
274
+ try (JedisPooled jedis = new JedisPooled (hnp , clientConfig .get (), CacheConfig .builder ().build ())) {
276
275
Cache cache = jedis .getCache ();
277
276
jedis .sadd ("foo" , "a" );
278
277
jedis .sadd ("foo" , "b" );
@@ -348,7 +347,7 @@ public void testConcurrentAccessWithStats() throws InterruptedException {
348
347
ExecutorService executorService = Executors .newFixedThreadPool (threadCount );
349
348
350
349
// Create the shared mock instance of cache
351
- try (JedisPooled jedis = new JedisPooled (endpoint .getHostAndPort (), clientConfig .get (), CacheConfig .builder ().maxSize ( 1000 ). build ())) {
350
+ try (JedisPooled jedis = new JedisPooled (endpoint .getHostAndPort (), clientConfig .get (), CacheConfig .builder ().build ())) {
352
351
Cache cache = jedis .getCache ();
353
352
// Submit multiple threads to perform concurrent operations
354
353
CountDownLatch latch = new CountDownLatch (threadCount );
@@ -385,7 +384,7 @@ public void testMaxSize() throws InterruptedException {
385
384
386
385
ExecutorService executorService = Executors .newFixedThreadPool (threadCount );
387
386
388
- try (JedisPooled jedis = new JedisPooled (endpoint .getHostAndPort (), clientConfig .get (), CacheConfig .builder ().maxSize (1000 ).build ())) {
387
+ try (JedisPooled jedis = new JedisPooled (endpoint .getHostAndPort (), clientConfig .get (), CacheConfig .builder ().maxSize (maxSize ).build ())) {
389
388
Cache testCache = jedis .getCache ();
390
389
// Submit multiple threads to perform concurrent operations
391
390
CountDownLatch latch = new CountDownLatch (threadCount );
0 commit comments