@@ -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