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