Skip to content

Commit e60f938

Browse files
committed
spotlessapply
Signed-off-by: tanishq ranjan <[email protected]>
1 parent bd3b4c1 commit e60f938

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/filecache/PruneFileCacheIT.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,30 +96,28 @@ public void testPruneCacheWithRealData() throws Exception {
9696
client.execute(PruneFileCacheAction.INSTANCE, request, future);
9797
PruneFileCacheResponse response = future.actionGet();
9898

99-
logger.info("--> Prune response: pruned {} bytes from {} nodes",
100-
response.getTotalPrunedBytes(), response.getNodes().size());
99+
logger.info("--> Prune response: pruned {} bytes from {} nodes", response.getTotalPrunedBytes(), response.getNodes().size());
101100

102101
// Verify response first - this is the key assertion
103102
assertNotNull("Response should not be null", response);
104103
assertEquals("Should have 1 successful node", 1, response.getNodes().size());
105104
assertEquals("Should have no failures", 0, response.failures().size());
106105
assertTrue("Operation should be successful", response.isCompletelySuccessful());
107106
assertTrue("Operation should be acknowledged", response.isAcknowledged());
108-
107+
109108
// The key assertion: pruned bytes should be > 0 (proves API actually worked)
110109
assertTrue("Should have pruned bytes", response.getTotalPrunedBytes() > 0);
111-
110+
112111
// Verify cache usage after prune
113112
long usageAfter = getFileCacheUsage();
114113
logger.info("--> File cache usage after prune: {} bytes", usageAfter);
115-
114+
116115
// Cache should be reduced (might not be zero if files are still referenced)
117116
assertTrue("Cache usage should be reduced after prune", usageAfter <= usageBefore);
118-
117+
119118
// The pruned bytes should roughly match the reduction
120119
long actualReduction = usageBefore - usageAfter;
121-
logger.info("--> Actual cache reduction: {} bytes, reported pruned: {} bytes",
122-
actualReduction, response.getTotalPrunedBytes());
120+
logger.info("--> Actual cache reduction: {} bytes, reported pruned: {} bytes", actualReduction, response.getTotalPrunedBytes());
123121

124122
assertDocCount(restoredIndexName, 100L);
125123
}

0 commit comments

Comments
 (0)