From 3686d2c1201b366f60105025d0d759ce2b241834 Mon Sep 17 00:00:00 2001 From: Sagar Upadhyaya Date: Mon, 24 Jun 2024 18:00:28 -0700 Subject: [PATCH] minor UT refactor Signed-off-by: Sagar Upadhyaya --- .../cache/common/tier/TieredSpilloverCacheTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java b/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java index 14dfdb67f1add..b9c7bbdb77d3d 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java +++ b/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java @@ -1007,8 +1007,8 @@ public void testComputeIfAbsentWithDiskCacheThrowingExceptionOnPut() throws Exce removalListener ); - String value = ""; - value = tieredSpilloverCache.computeIfAbsent(getICacheKey("test"), new LoadAwareCacheLoader<>() { + String response = ""; + response = tieredSpilloverCache.computeIfAbsent(getICacheKey("test"), new LoadAwareCacheLoader<>() { @Override public boolean isLoaded() { return false; @@ -1023,7 +1023,7 @@ public String load(ICacheKey key) { assertEquals(0, diskStats.getSizeInBytes()); assertEquals(1, removalListener.evictionsMetric.count()); - assertEquals("test", value); + assertEquals("test", response); assertEquals(0, tieredSpilloverCache.completableFutureMap.size()); }