Class CircuitBreakerRetryTest

java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.CircuitBreakerRetryTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener

public class CircuitBreakerRetryTest extends org.jboss.arquillian.testng.Arquillian
Test CircuitBreaker Thresholds and delays with Retries.
Author:
Neil Young, Andrew Rouse
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.jboss.arquillian.testng.Arquillian

    org.jboss.arquillian.testng.Arquillian.UpdateResultListener
  • Field Summary

    Fields inherited from class org.jboss.arquillian.testng.Arquillian

    ARQUILLIAN_DATA_PROVIDER
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.jboss.shrinkwrap.api.spec.WebArchive
     
    void
    A test to exercise Circuit Breaker thresholds with insufficient retries to open the Circuit so that the Circuit remains closed and a TestException is caught.
    void
    A test to exercise Circuit Breaker thresholds with insufficient retries to open the Circuit so that the Circuit remains closed and a TestException is caught when using an Asynchronous call.
    void
    A test to exercise Circuit Breaker thresholds with sufficient retries to open the Circuit and result in a CircuitBreakerOpenException.
    void
    A test to exercise Circuit Breaker thresholds with sufficient retries to open the Circuit and result in a CircuitBreakerOpenException using an Asynchronous call.
    void
    Analogous to testCircuitOpenWithMoreRetries but execution failures are caused by timeouts.
    void
    Analogous to testCircuitOpenWithMoreRetriesAsync but execution failures are caused by timeouts.
    void
    Analogous to testCircuitOpenWithFewRetries with Class level @CircuitBreaker and @Retry annotations that are overridden by serviceB.
    void
    Analogous to testCircuitOpenWithMoreRetries with Class level @CircuitBreaker and @Retry annotations that are inherited by serviceA
    void
    Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is included in the abortOn attribute of the Retry annotation
    void
    Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is included in the abortOn attribute of the Retry annotation
    void
    Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is not included in the retryOn attribute of the Retry annotation
    void
    Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is not included in the retryOn attribute of the Retry annotation
    void
    Test that we retry around an open circuit breaker
    void
    Test that we retry around an open circuit breaker

    Methods inherited from class org.jboss.arquillian.testng.Arquillian

    arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CircuitBreakerRetryTest

      public CircuitBreakerRetryTest()
  • Method Details

    • deploy

      @Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
    • testCircuitOpenWithMoreRetries

      public void testCircuitOpenWithMoreRetries()
      A test to exercise Circuit Breaker thresholds with sufficient retries to open the Circuit and result in a CircuitBreakerOpenException.
    • testCircuitOpenWithFewRetries

      public void testCircuitOpenWithFewRetries()
      A test to exercise Circuit Breaker thresholds with insufficient retries to open the Circuit so that the Circuit remains closed and a TestException is caught.
    • testClassLevelCircuitOpenWithMoreRetries

      public void testClassLevelCircuitOpenWithMoreRetries()
      Analogous to testCircuitOpenWithMoreRetries with Class level @CircuitBreaker and @Retry annotations that are inherited by serviceA
    • testClassLevelCircuitOpenWithFewRetries

      public void testClassLevelCircuitOpenWithFewRetries()
      Analogous to testCircuitOpenWithFewRetries with Class level @CircuitBreaker and @Retry annotations that are overridden by serviceB.
    • testCircuitOpenWithMultiTimeouts

      public void testCircuitOpenWithMultiTimeouts()
      Analogous to testCircuitOpenWithMoreRetries but execution failures are caused by timeouts.
    • testRetriesSucceedWhenCircuitCloses

      public void testRetriesSucceedWhenCircuitCloses()
      Test that we retry around an open circuit breaker

      Test that when retries are configured with sufficient delay, a call to an open circuit can retry until the circuit half-closes, allowing the call to succeed.

    • testNoRetriesIfNotRetryOn

      public void testNoRetriesIfNotRetryOn()
      Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is not included in the retryOn attribute of the Retry annotation

      This test calls a method which only retries on TimeoutException

    • testNoRetriesIfAbortOn

      public void testNoRetriesIfAbortOn()
      Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is included in the abortOn attribute of the Retry annotation
    • testCircuitOpenWithMoreRetriesAsync

      public void testCircuitOpenWithMoreRetriesAsync()
      A test to exercise Circuit Breaker thresholds with sufficient retries to open the Circuit and result in a CircuitBreakerOpenException using an Asynchronous call.
    • testCircuitOpenWithFewRetriesAsync

      public void testCircuitOpenWithFewRetriesAsync()
      A test to exercise Circuit Breaker thresholds with insufficient retries to open the Circuit so that the Circuit remains closed and a TestException is caught when using an Asynchronous call.
    • testCircuitOpenWithMultiTimeoutsAsync

      public void testCircuitOpenWithMultiTimeoutsAsync()
      Analogous to testCircuitOpenWithMoreRetriesAsync but execution failures are caused by timeouts.
    • testRetriesSucceedWhenCircuitClosesAsync

      public void testRetriesSucceedWhenCircuitClosesAsync()
      Test that we retry around an open circuit breaker

      Test that when retries are configured with sufficient delay, a call to an open circuit can retry until the circuit half-closes, allowing the call to succeed.

    • testNoRetriesIfNotRetryOnAsync

      public void testNoRetriesIfNotRetryOnAsync()
      Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is not included in the retryOn attribute of the Retry annotation

      This test calls a method which only retries on TimeoutException

    • testNoRetriesIfAbortOnAsync

      public void testNoRetriesIfAbortOnAsync()
      Test that we don't retry around an open circuit breaker if CircuitBreakerOpenException is included in the abortOn attribute of the Retry annotation