Improve reproducability of RestControllerTests
With this commit we use the classic parent circuit breaker which does not account for real memory usage. In those tests we want to have reproducible results and hence it makes sense to disable the real memory circuit breaker there.
This commit is contained in:
parent
a721d09c81
commit
5236f2b1af
|
@ -81,6 +81,8 @@ public class RestControllerTests extends ESTestCase {
|
|||
circuitBreakerService = new HierarchyCircuitBreakerService(
|
||||
Settings.builder()
|
||||
.put(HierarchyCircuitBreakerService.IN_FLIGHT_REQUESTS_CIRCUIT_BREAKER_LIMIT_SETTING.getKey(), BREAKER_LIMIT)
|
||||
// We want to have reproducible results in this test, hence we disable real memory usage accounting
|
||||
.put(HierarchyCircuitBreakerService.USE_REAL_MEMORY_USAGE_SETTING.getKey(), false)
|
||||
.build(),
|
||||
new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS));
|
||||
usageService = new UsageService(settings);
|
||||
|
|
Loading…
Reference in New Issue