Skip to content

Commit

Permalink
remove unncessary maxsize
Browse files Browse the repository at this point in the history
  • Loading branch information
atakavci committed Aug 29, 2024
1 parent e69ae8d commit 2923793
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void flushAllTest() {
control.set("k" + i, "v" + i);
}

try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().maxSize(1000).build())) {
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().build())) {
Cache cache = jedis.getCache();
for (int i = 0; i < count; i++) {
jedis.get("k" + i);
Expand Down Expand Up @@ -92,7 +92,7 @@ public void lruEvictionTest() {

@Test // T.5.2
public void deleteByKeyUsingMGetTest() {
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().maxSize(1000).build())) {
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().build())) {
Cache clientSideCache = jedis.getCache();

jedis.set("1", "one");
Expand Down Expand Up @@ -216,7 +216,7 @@ public void multiKeyOperation() {
control.set("k1", "v1");
control.set("k2", "v2");

try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().maxSize(1000).build())) {
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().build())) {
jedis.mget("k1", "k2");
assertEquals(1, jedis.getCache().getSize());
}
Expand Down Expand Up @@ -272,7 +272,7 @@ public void testInvalidationWithUnifiedJedis() {
public void differentInstanceOnEachCacheHit() {

// fill the cache for maxSize
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().maxSize(1000).build())) {
try (JedisPooled jedis = new JedisPooled(hnp, clientConfig.get(), CacheConfig.builder().build())) {
Cache cache = jedis.getCache();
jedis.sadd("foo", "a");
jedis.sadd("foo", "b");
Expand Down Expand Up @@ -348,7 +348,7 @@ public void testConcurrentAccessWithStats() throws InterruptedException {
ExecutorService executorService = Executors.newFixedThreadPool(threadCount);

// Create the shared mock instance of cache
try (JedisPooled jedis = new JedisPooled(endpoint.getHostAndPort(), clientConfig.get(), CacheConfig.builder().maxSize(1000).build())) {
try (JedisPooled jedis = new JedisPooled(endpoint.getHostAndPort(), clientConfig.get(), CacheConfig.builder().build())) {
Cache cache = jedis.getCache();
// Submit multiple threads to perform concurrent operations
CountDownLatch latch = new CountDownLatch(threadCount);
Expand Down Expand Up @@ -385,7 +385,7 @@ public void testMaxSize() throws InterruptedException {

ExecutorService executorService = Executors.newFixedThreadPool(threadCount);

try (JedisPooled jedis = new JedisPooled(endpoint.getHostAndPort(), clientConfig.get(), CacheConfig.builder().maxSize(1000).build())) {
try (JedisPooled jedis = new JedisPooled(endpoint.getHostAndPort(), clientConfig.get(), CacheConfig.builder().maxSize(maxSize).build())) {
Cache testCache = jedis.getCache();
// Submit multiple threads to perform concurrent operations
CountDownLatch latch = new CountDownLatch(threadCount);
Expand Down

0 comments on commit 2923793

Please sign in to comment.