org.eclipse.microprofile.fault.tolerance.tck.disableEnv

## Class DisableAnnotationOnClassEnableOnMethodTest

- java.lang.Object
- - org.jboss.arquillian.testng.Arquillian
  - - org.eclipse.microprofile.fault.tolerance.tck.disableEnv.DisableAnnotationOnClassEnableOnMethodTest

All Implemented Interfaces:
  org.testng.IHookable, org.testng.ITestNGListener

    public class DisableAnnotationOnClassEnableOnMethodTest
    extends org.jboss.arquillian.testng.Arquillian

Test that annotations can be disabled at the class level and then re-enabled at the method level.

Author:
  Antoine Sabot-Durand, 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 and Description
`DisableAnnotationOnClassEnableOnMethodTest()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static org.jboss.shrinkwrap.api.spec.WebArchive` `deploy()`
`void` `testAsync()` A test to check that asynchronous is enabled
`void` `testBulkhead()` Test whether Bulkhead is enabled on `waitWithBulkhead()`
`void` `testCircuitBreaker()` CircuitBreaker is enabled on the method so the policy should be applied
`void` `testFallbackDisabled()` Test that a Fallback service is used when service fails.
`void` `testRetryEnabled()` failAndRetryOnce is annotated with maxRetries = 1 so it is expected to execute 2 times.
`void` `testTimeout()` Test Timeout is enabled, should fail with a timeout exception

### 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 Detail

#### DisableAnnotationOnClassEnableOnMethodTest

    public DisableAnnotationOnClassEnableOnMethodTest()

### Method Detail

#### deploy

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

#### testRetryEnabled

    public void testRetryEnabled()

failAndRetryOnce is annotated with maxRetries = 1 so it is expected to execute 2 times.

#### testFallbackDisabled

    public void testFallbackDisabled()

Test that a Fallback service is used when service fails. Retry has been disabled on the class and has not been enabled for the method, therefore there should only be one execution

#### testCircuitBreaker

    public void testCircuitBreaker()

CircuitBreaker is enabled on the method so the policy should be applied

#### testTimeout

    public void testTimeout()

Test Timeout is enabled, should fail with a timeout exception

#### testAsync

    public void testAsync()
                   throws InterruptedException,
                          ExecutionException

A test to check that asynchronous is enabled

Throws:
  `InterruptedException` - interrupted
  `ExecutionException` - task was aborted

#### testBulkhead

    public void testBulkhead()
                      throws ExecutionException,
                             InterruptedException

Test whether Bulkhead is enabled on `waitWithBulkhead()`

Throws:
  `InterruptedException` - interrupted
  `ExecutionException` - task was aborted