C# Class Hudl.Mjolnir.Tests.Breaker.FailurePercentageCircuitBreakerTests

Show file Open project: hudl/Mjolnir Class Usage Examples

Private Methods

Method Description
Construct_BreakerIsntTripped ( ) : void
CreateBreakerProperties ( long minimumOperations, int thresholdPercentage, long brokenDurationMillis, bool forceTripped = false, bool forceFixed = false ) : FailurePercentageCircuitBreakerProperties
CreateMockMetricsWithSnapshot ( long total, int percent ) : Mock

Creates a mock metrics object whose GetSnapshot() will have the provided current total and error percent.

IsAllowing_AboveTotalAboveThreshold_RejectsAndTrips ( ) : void
IsAllowing_AboveTotalBelowThreshold_AllowsAndDoesntTrip ( ) : void
IsAllowing_AboveTotalEqualThreshold_RejectsAndTrips ( ) : void
IsAllowing_AfterFailedSingleTest_KeepsBreakerTrippedAndSendsAnotherTestAfterAnotherDuration ( ) : void
IsAllowing_AfterSuccessfulSingleTest_FixesBreaker ( ) : void
IsAllowing_AfterTrippedAndAfterWaitPeriod_SendsSingleTestAndRejectsOthers ( ) : void
IsAllowing_AfterTrippedAndWithinWaitPeriod_Rejects ( ) : void
IsAllowing_BelowTotalAboveThreshold_AllowsAndDoesntTrip ( ) : void
IsAllowing_BelowTotalBelowThreshold_AllowsAndDoesntTrip ( ) : void
IsAllowing_BelowTotalEqualThreshold_AllowsAndDoesntTrip ( ) : void
IsAllowing_EqualTotalAboveThreshold_RejectsAndTrips ( ) : void
IsAllowing_EqualTotalBelowThreshold_AllowsAndDoesntTrip ( ) : void
IsAllowing_EqualTotalEqualThreshold_RejectsAndTrips ( ) : void
IsAllowing_MultipleDurationsBetweenFailureAndNextFailure_KeepsBreakerTripped ( ) : void
IsAllowing_MultipleDurationsBetweenFailureAndNextSuccess_FixesBreakerOnSuccess ( ) : void
IsAllowing_WhenAlreadyTripped_DoesntReTripBreaker ( ) : void
IsAllowing_WhenBothForcePropertiesSet_Rejects ( ) : void
IsAllowing_WhenPropertiesForceFixedButBreakerWouldNormallyTrip_SilentlyTripsTheBreaker ( ) : void
IsAllowing_WhenPropertiesForceFixed_Allows ( ) : void
IsAllowing_WhenPropertiesForceTripped_Rejects ( ) : void
MarkSuccess_ForLongRunningSingleTest_FixesBreaker ( ) : void
MarkSuccess_ImmediatelyAfterTrippingButStartedBeforeTripped_DoesntImmediatelyFix ( ) : void
MarkSuccess_WhenNotTripped_DoesntResetMetrics ( ) : void
MarkSuccess_WhenTrippedAndAfterWaitDuration_ResetsMetrics ( ) : void