File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
server/src/test/java/org/elasticsearch/search Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3010,18 +3010,19 @@ public void testFetchPhaseAccountsForSourceMemoryUsage() throws Exception {
30103010 .get ();
30113011 if (fetchSearchResult != null ) {
30123012 long usedBeforeResultDecRef = breaker .getUsed ();
3013- if (fetchSearchResult .decRef ()) {
3014- assertThat (usedBeforeResultDecRef , greaterThanOrEqualTo (48_000L ));
3015- // when releasing the result references we should clear at least 48_000 bytes (48 hits with sources of at least 1000
3016- // bytes)
3013+ fetchSearchResult .decRef ();
3014+ assertBusy (() -> {
30173015 long usedAfterResultDecRef = breaker .getUsed ();
30183016 logger .info (
30193017 "--> usedBeforeResultDecRef: [{}], usedAfterResultDecRef: [{}]" ,
30203018 usedBeforeResultDecRef ,
30213019 usedAfterResultDecRef
30223020 );
3021+ assertThat (usedBeforeResultDecRef , greaterThanOrEqualTo (48_000L ));
3022+ // when releasing the result references we should clear at least 48_000 bytes (48 hits with sources of at least 1000
3023+ // bytes)
30233024 assertThat (usedBeforeResultDecRef - usedAfterResultDecRef , greaterThanOrEqualTo (48_000L ));
3024- }
3025+ });
30253026 }
30263027 }
30273028 }
You can’t perform that action at this time.
0 commit comments