[TEST] Check accounting breaker is equal to segment stats rather than 0

If there are existing indices, it may not be 0
This commit is contained in:
Lee Hinman 2017-12-04 14:14:45 -07:00
parent e0b1a6544d
commit 1ff5ef9055
1 changed files with 4 additions and 2 deletions

View File

@ -168,8 +168,10 @@ public final class ExternalTestCluster extends TestCluster {
for (NodeStats stats : nodeStats.getNodes()) { for (NodeStats stats : nodeStats.getNodes()) {
assertThat("Fielddata breaker not reset to 0 on node: " + stats.getNode(), assertThat("Fielddata breaker not reset to 0 on node: " + stats.getNode(),
stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getEstimated(), equalTo(0L)); stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getEstimated(), equalTo(0L));
assertThat("Accounting breaker not reset to 0 on node: " + stats.getNode(), assertThat("Accounting breaker not reset to " + stats.getIndices().getSegments().getMemoryInBytes() +
stats.getBreaker().getStats(CircuitBreaker.ACCOUNTING).getEstimated(), equalTo(0L)); " on node: " + stats.getNode(),
stats.getBreaker().getStats(CircuitBreaker.ACCOUNTING).getEstimated(),
equalTo(stats.getIndices().getSegments().getMemoryInBytes()));
// ExternalTestCluster does not check the request breaker, // ExternalTestCluster does not check the request breaker,
// because checking it requires a network request, which in // because checking it requires a network request, which in
// turn increments the breaker, making it non-0 // turn increments the breaker, making it non-0