Package org.elasticsearch.test
Class BreakerTestUtil
java.lang.Object
org.elasticsearch.test.BreakerTestUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Exception>
ByteSizeValuefindBreakerLimit
(ByteSizeValue tooBigToBreak, org.elasticsearch.core.CheckedConsumer<ByteSizeValue, E> c) Performs a binary search between 0 andtooBigToBreak
bytes for the largest memory size that'll cause the closure parameter to throw aCircuitBreakingException
.
-
Constructor Details
-
BreakerTestUtil
public BreakerTestUtil()
-
-
Method Details
-
findBreakerLimit
public static <E extends Exception> ByteSizeValue findBreakerLimit(ByteSizeValue tooBigToBreak, org.elasticsearch.core.CheckedConsumer<ByteSizeValue, E> c) throws EPerforms a binary search between 0 andtooBigToBreak
bytes for the largest memory size that'll cause the closure parameter to throw aCircuitBreakingException
.- Throws:
E
-