Package com.guinetik.rr.http
Class CircuitBreakerClientTest
- java.lang.Object
-
- com.guinetik.rr.http.CircuitBreakerClientTest
-
public class CircuitBreakerClientTest extends Object
Unit tests for CircuitBreakerClient focusing on validation, thread-safety, and the HALF_OPEN race condition fix.
-
-
Constructor Summary
Constructors Constructor Description CircuitBreakerClientTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestCircuitOpensAfterThresholdFailures()voidtestCircuitStartsClosed()voidtestConstructorAcceptsValidParameters()voidtestConstructorDefaultsNullFailurePolicy()voidtestConstructorRejectsNegativeDecayTime()voidtestConstructorRejectsNegativeFailureThreshold()voidtestConstructorRejectsNegativeResetTimeout()voidtestConstructorRejectsNullDelegate()voidtestConstructorRejectsZeroFailureThreshold()voidtestFullConstructorRejectsNullDelegate()voidtestHalfOpenAllowsOnlyOneTestRequest()voidtestHalfOpenTestFlagResetOnFailure()voidtestHalfOpenTestFlagResetOnSuccess()voidtestManualResetClearsAllState()voidtestMetricsIncludeHalfOpenTestStatus()voidtestOpenCircuitRejectsRequests()voidtestSuccessfulRequestKeepsCircuitClosed()
-
-
-
Method Detail
-
testConstructorRejectsNullDelegate
public void testConstructorRejectsNullDelegate()
-
testFullConstructorRejectsNullDelegate
public void testFullConstructorRejectsNullDelegate()
-
testConstructorRejectsZeroFailureThreshold
public void testConstructorRejectsZeroFailureThreshold()
-
testConstructorRejectsNegativeFailureThreshold
public void testConstructorRejectsNegativeFailureThreshold()
-
testConstructorRejectsNegativeResetTimeout
public void testConstructorRejectsNegativeResetTimeout()
-
testConstructorRejectsNegativeDecayTime
public void testConstructorRejectsNegativeDecayTime()
-
testConstructorAcceptsValidParameters
public void testConstructorAcceptsValidParameters()
-
testConstructorDefaultsNullFailurePolicy
public void testConstructorDefaultsNullFailurePolicy()
-
testCircuitStartsClosed
public void testCircuitStartsClosed()
-
testSuccessfulRequestKeepsCircuitClosed
public void testSuccessfulRequestKeepsCircuitClosed()
-
testCircuitOpensAfterThresholdFailures
public void testCircuitOpensAfterThresholdFailures()
-
testOpenCircuitRejectsRequests
public void testOpenCircuitRejectsRequests()
-
testHalfOpenAllowsOnlyOneTestRequest
public void testHalfOpenAllowsOnlyOneTestRequest() throws Exception- Throws:
Exception
-
testHalfOpenTestFlagResetOnSuccess
public void testHalfOpenTestFlagResetOnSuccess() throws Exception- Throws:
Exception
-
testHalfOpenTestFlagResetOnFailure
public void testHalfOpenTestFlagResetOnFailure() throws Exception- Throws:
Exception
-
testManualResetClearsAllState
public void testManualResetClearsAllState()
-
testMetricsIncludeHalfOpenTestStatus
public void testMetricsIncludeHalfOpenTestStatus()
-
-