public class AsynchronousTest
extends org.jboss.arquillian.testng.Arquillian
Constructor and Description |
---|
AsynchronousTest() |
Modifier and Type | Method and Description |
---|---|
void |
completeWaitingFutures()
Ensure that any waiting futures get completed at the end of each test
|
static org.jboss.shrinkwrap.api.spec.WebArchive |
deploy() |
void |
testAsyncIsFinished()
Test that the future returned by calling an asynchronous method is done if called after waiting enough time to
end the operation
|
void |
testAsyncIsNotFinished()
Test that the future returned by calling an asynchronous method is not done if called right after the operation
|
void |
testAsyncRequestContextWithCompletionStage()
Test that the request context is active during execution for an asynchronous method that returns a
CompletionStage
If the request scope is active, then an @ApplicationScoped bean should be able to asynchronously call
an @Asynchronous method returning a CompletionStage on a @RequestScoped bean, and return the correct result
|
void |
testAsyncRequestContextWithFuture()
Test that the request context is active during execution for an asynchronous method that returns a Future
If the request scope is active, then an @ApplicationScoped bean should be able to asynchronously call
an @Asynchronous method returning a Future on a @RequestScoped bean, and return the correct result
|
void |
testClassLevelAsyncIsFinished()
Test that the future returned by calling a method in an asynchronous class is done if called after waiting enough
time to end the operation
|
void |
testClassLevelAsyncIsNotFinished()
Test that the future returned by calling a method in an asynchronous class is not done if called right after the
operation
|
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
public void testAsyncIsNotFinished()
public void testAsyncIsFinished()
public void testClassLevelAsyncIsNotFinished()
public void testClassLevelAsyncIsFinished()
public void testAsyncRequestContextWithCompletionStage() throws InterruptedException, ExecutionException, TimeoutException
public void testAsyncRequestContextWithFuture() throws InterruptedException, ExecutionException, TimeoutException
@AfterMethod public void completeWaitingFutures()
Important in case tests end early due to an exception or failure.
Copyright © 2016 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.