[TEST] fix off-by-one error in BigArrays tests
Comparisons for the BigArrays breaker use "greater than" instead of "greater than or equal", which was never an issue before because the test size was not right on a page boundary. A test with an exactly divisible page boundary (4mb exactly in this case) caused the sizes to be equal to, but not exceed, the limit, and never break. The limit should be smaller than the test increments the breaker anyway.
This commit is contained in:
parent
172a40c55e
commit
1e21f27874
|
@ -336,7 +336,7 @@ public class BigArraysTests extends ElasticsearchSingleNodeTest {
|
|||
for (String type : Arrays.asList("Byte", "Int", "Long", "Float", "Double", "Object")) {
|
||||
HierarchyCircuitBreakerService hcbs = new HierarchyCircuitBreakerService(
|
||||
ImmutableSettings.builder()
|
||||
.put(HierarchyCircuitBreakerService.REQUEST_CIRCUIT_BREAKER_LIMIT_SETTING, size)
|
||||
.put(HierarchyCircuitBreakerService.REQUEST_CIRCUIT_BREAKER_LIMIT_SETTING, size - 1)
|
||||
.build(),
|
||||
new NodeSettingsService(ImmutableSettings.EMPTY));
|
||||
BigArrays bigArrays = new BigArrays(ImmutableSettings.EMPTY, null, hcbs).withCircuitBreaking();
|
||||
|
|
Loading…
Reference in New Issue