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

# Class DisableFTEnableOnClassTest

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

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

public class DisableFTEnableOnClassTest extends org.jboss.arquillian.testng.Arquillian
Test that annotations can be disabled globally and then re-enabled at the class 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
Description
`DisableFTEnableOnClassTest()`

## Method Summary

Modifier and Type
Method
Description
`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`
`testFallbackEnabled()`
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 Details

### DisableFTEnableOnClassTest

public DisableFTEnableOnClassTest()

## Method Details

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

### testFallbackEnabled

public void testFallbackEnabled()
Test that a Fallback service is used when service fails. Retry is also enabled so there should be two executions

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