[TEST] Check accounting breaker is equal to segment stats rather than 0
If there are existing indices, it may not be 0
@@ -168,8 +168,10 @@ public final class ExternalTestCluster extends TestCluster {
for (NodeStats stats : nodeStats.getNodes()) {
assertThat("Fielddata breaker not reset to 0 on node: " + stats.getNode(),
stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getEstimated(), equalTo(0L));
- assertThat("Accounting breaker not reset to 0 on node: " + stats.getNode(),
- stats.getBreaker().getStats(CircuitBreaker.ACCOUNTING).getEstimated(), equalTo(0L));
+ assertThat("Accounting breaker not reset to " + stats.getIndices().getSegments().getMemoryInBytes() +
+ " on node: " + stats.getNode(),
+ stats.getBreaker().getStats(CircuitBreaker.ACCOUNTING).getEstimated(),
+ equalTo(stats.getIndices().getSegments().getMemoryInBytes()));
// ExternalTestCluster does not check the request breaker,
// because checking it requires a network request, which in
// turn increments the breaker, making it non-0
