Class AsyncMethodTest
java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.rest.client.tck.WiremockArquillianTest
org.eclipse.microprofile.rest.client.tck.asynctests.AsyncMethodTest
- All Implemented Interfaces:
org.testng.IHookable,org.testng.ITestNGListener
Verifies via CDI injection that you can use a programmatic interface. verifies that the interface has Dependent
scope. This test is the same as the
CDIInvokeSimpleGetOperationTest but uses async methods.-
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.shrinkwrap.api.spec.WebArchivevoidThis test uses aClientRequestFilterto update the destination URI.voidTests that the MP Rest Client implementation uses the specified ExecutorService.voidTests that a Rest Client interface method that returns a CompletionStage where it's parameterized type is some Object type other than Response) is invoked asychronously - checking that the thread ID of the response does not match the thread ID of the calling thread.voidTests that a Rest Client interface method that returns CompletionStage is invoked asychronously - checking that the thread ID of the response does not match the thread ID of the calling thread.voidThis test verifies that theRestClientBuilderimplementation will throw anIllegalArgumentExceptionwhen a null value is passed to theexecutorServicemethod.Methods inherited from class org.eclipse.microprofile.rest.client.tck.WiremockArquillianTest
getPort, getServerURI, getServerURL, getStringURL, setupServerMethods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
-
Constructor Details
-
AsyncMethodTest
public AsyncMethodTest()
-
-
Method Details
-
createDeployment
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive createDeployment() -
testInterfaceMethodWithCompletionStageResponseReturnIsInvokedAsynchronously
public void testInterfaceMethodWithCompletionStageResponseReturnIsInvokedAsynchronously() throws ExceptionTests that a Rest Client interface method that returns CompletionStage is invoked asychronously - checking that the thread ID of the response does not match the thread ID of the calling thread.- Throws:
Exception- - indicates test failure
-
testInterfaceMethodWithCompletionStageObjectReturnIsInvokedAsynchronously
public void testInterfaceMethodWithCompletionStageObjectReturnIsInvokedAsynchronously() throws ExceptionTests that a Rest Client interface method that returns a CompletionStage where it's parameterized type is some Object type other than Response) is invoked asychronously - checking that the thread ID of the response does not match the thread ID of the calling thread.- Throws:
Exception- - indicates test failure
-
testExecutorService
Tests that the MP Rest Client implementation uses the specified ExecutorService.- Throws:
Exception- - indicates test failure
-
testAsyncInvocationInterceptorProvider
This test uses aClientRequestFilterto update the destination URI. It attempts to update it based on a ThreadLocal object on the calling thread. It uses anAsyncInvocationInterceptorFactoryprovider to copy the ThreadLocal value from the calling thread to the async thread.- Throws:
Exception- - indicates test failure
-
testNullExecutorServiceThrowsIllegalArgumentException
public void testNullExecutorServiceThrowsIllegalArgumentException()This test verifies that theRestClientBuilderimplementation will throw anIllegalArgumentExceptionwhen a null value is passed to theexecutorServicemethod.- Throws:
IllegalArgumentException- - expected when passing null
-