public class RetryConditionTest
extends org.jboss.arquillian.testng.Arquillian
Constructor and Description |
---|
RetryConditionTest() |
Modifier and Type | Method and Description |
---|---|
static org.jboss.shrinkwrap.api.spec.WebArchive |
deploy() |
void |
testAsyncRetryExceptionally()
Persistent Error condition.
|
void |
testClassLevelRetryOnFalse()
Analogous to testRetryonFalse, testing whether the
@Retry annotation on method serviceB overrides the Class level
@Retry annotation. |
void |
testClassLevelRetryOnTrue()
Analogous to testRetryOnTrue but using a Class level rather than method level annotation.
|
void |
testClassLevelRetryWithAbortOnFalse()
Analogous to testRetryWithAbortOnFalse but using a Class level rather than method level
@Retry annotation. |
void |
testClassLevelRetryWithAbortOnTrue()
Analogous to testRetryWithAbortOnTrue, testing whether the
@Retry annotation on method serviceB overrides the Class level
@Retry annotation. |
void |
testNoAsynRetryOnMethodException()
Persistent Error condition outside the CompletableFuture.
|
void |
testNoAsynWilNotRetryExceptionally()
Persistent Error condition inside a CompletableFuture.
|
void |
testRetryChainExceptionally()
Persistent Error condition.
|
void |
testRetryChainSuccess()
Temporary error.
|
void |
testRetryCompletionStageWithException()
Temporary error.
|
void |
testRetryOnFalse()
Test that no retries are executed where a failure declared as "retry on" in the
@Retry annotation
is NOT encountered. |
void |
testRetryOnFalseAndAbortOnTrueThrowingAChildCustomException()
Test that retries are executed where a failure declared as "retry on" in the
@Retry
annotation is encountered by inheritance. |
void |
testRetryOnTrue()
Test that retries are executed where a failure declared as "retry on" in the
@Retry annotation is encountered. |
void |
testRetryOnTrueThrowingAChildCustomException()
Test that retries are executed where a failure declared as "retry on" in the
@Retry
annotation is encountered by inheritance. |
void |
testRetryParallelExceptionally()
Persistent Error condition.
|
void |
testRetryParallelSuccess()
Temporary error.
|
void |
testRetrySuccess()
Temporary error.
|
void |
testRetryWithAbortOnFalse()
Test that the default number of retries are executed where a failure declared as "abort on" in the
@Retry annotation
is NOT encountered. |
void |
testRetryWithAbortOnTrue()
Test that no retries are executed where a failure declared as "abort on" in the
@Retry annotation
is encountered. |
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
public void testRetryOnTrue()
@Retry
annotation is encountered.
serviceA is configured to retry on a RuntimeException. The service should be retried 3 times.public void testRetryOnFalse()
@Retry
annotation
is NOT encountered.
serviceB is configured to retry on an IOException. In practice the only exception that the service
will throw is a RuntimeException, therefore no retries should be executed.public void testRetryOnTrueThrowingAChildCustomException()
@Retry
annotation is encountered by inheritance.
Service that throws a child custom exception but in the retry on list is configured child's parent custom exceptionpublic void testRetryOnFalseAndAbortOnTrueThrowingAChildCustomException()
@Retry
annotation is encountered by inheritance.
Service that throws a child custom exception but in the retry on list is configured child's parent custom exception
and in the abort on list is configured the child custom exception.
For this case the retry on will be false and the abort on will be true due the class configured in the abort on list
is equals to the exception that is throwing by the serviceD not like in the retry on list where is configured the
parent exception class of the throwing by the serviceD. So the highest priority will be when the exception type is equalspublic void testRetryWithAbortOnFalse()
@Retry
annotation
is NOT encountered.
serviceA is configured to abort on an IOException. In practice the only exception that the service
will throw is a RuntimeException, therefore the default number of 3 retries should be executed.public void testRetryWithAbortOnTrue()
@Retry
annotation
is encountered.
serviceB is configured to abort on a RuntimeException. The service should not be retried.public void testClassLevelRetryOnTrue()
public void testClassLevelRetryOnFalse()
@Retry
annotation on method serviceB overrides the Class level
@Retry
annotation.
serviceB is configured to retry on an IOException. In practice the only exception that the service
will throw is a RuntimeException, therefore no retries should be executed.public void testClassLevelRetryWithAbortOnFalse()
@Retry
annotation.
Test that the default number of retries are executed where a failure declared as "abort on" in the @Retry
annotation
is NOT encountered.
The Class, and therefore serviceA, is configured to abort on an IOException. In practice the only exception that the service
will throw is a RuntimeException, therefore the default number of 3 retries should be executed.public void testClassLevelRetryWithAbortOnTrue()
@Retry
annotation on method serviceB overrides the Class level
@Retry
annotation.
Test that no retries are executed where a failure declared as "abort on" in the @Retry
annotation
is encountered.
serviceB is configured to abort on a RuntimeException. The service should not be retried.public void testAsyncRetryExceptionally()
Asynchronous
and will always return IOException.public void testNoAsynWilNotRetryExceptionally()
public void testNoAsynRetryOnMethodException()
public void testRetrySuccess()
Asynchronous
.public void testRetryChainSuccess()
Asynchronous
and chains 2 CompletableFutures.public void testRetryChainExceptionally()
public void testRetryParallelExceptionally()
public void testRetryParallelSuccess()
Asynchronous
and 2 CompletableFutures.public void testRetryCompletionStageWithException()
Copyright © 2020 Eclipse Foundation. All rights reserved.