public class BulkheadAsynchTest
extends org.jboss.arquillian.testng.Arquillian
Constructor and Description |
---|
BulkheadAsynchTest() |
Modifier and Type | Method and Description |
---|---|
static org.jboss.shrinkwrap.api.spec.WebArchive |
deploy()
This is the Arquillian deploy method that controls the contents of the
war that contains all the tests.
|
static void |
testBulkhead(int maxRunning,
int maxQueued,
Function<Barrier,Future<?>> bulkheadMethod)
Conducts a standard test to ensure that an asynchronous bulkhead with no
other annotations works correctly.
|
void |
testBulkheadClassAsynchronous10()
Tests the class asynchronous Bulkhead(10) This test will check that 10
and no more than 10 asynchronous calls are allowed into a method that is
a member of a
@Bulkhead(10) Class. |
void |
testBulkheadClassAsynchronous3()
Tests the class asynchronous Bulkhead(3) This test will check that 3 and
no more than 3 asynchronous calls are allowed into a method that is a
member of a
@Bulkhead(3) Class. |
void |
testBulkheadClassAsynchronousDefault()
Tests the basic class asynchronous Bulkhead with defaulting value
parameter.
|
void |
testBulkheadClassAsynchronousQueueing5()
Tests the queueing class asynchronous Bulkhead with value parameter 10.
|
void |
testBulkheadCompletionStage()
Test that an asynchronous method which returns an incomplete CompletionStage still reserves a slot in the bulkhead
|
void |
testBulkheadMethodAsynchronous10()
Tests the method asynchronous Bulkhead(10).
|
void |
testBulkheadMethodAsynchronous3()
Tests the method asynchronous Bulkhead(3).
|
void |
testBulkheadMethodAsynchronousDefault()
Tests the basic method asynchronous Bulkhead with defaulting value
parameter.
|
void |
testBulkheadMethodAsynchronousQueueing5()
Tests the queueing method asynchronous Bulkhead with value parameter 10.
|
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
public void testBulkheadClassAsynchronous10()
@Bulkhead(10)
Class.public void testBulkheadMethodAsynchronous10()
@Bulkhead(10)
annotationpublic void testBulkheadClassAsynchronous3()
@Bulkhead(3)
Class.public void testBulkheadMethodAsynchronous3()
public void testBulkheadClassAsynchronousDefault()
public void testBulkheadMethodAsynchronousDefault()
public void testBulkheadClassAsynchronousQueueing5()
public void testBulkheadMethodAsynchronousQueueing5()
public void testBulkheadCompletionStage() throws InterruptedException, ExecutionException, TimeoutException
public static void testBulkhead(int maxRunning, int maxQueued, Function<Barrier,Future<?>> bulkheadMethod)
The bulkheadMethod
should be a reference to a method annotated with
Bulkhead
and Asynchronous
which accepts a Barrier
and
calls Barrier.await()
.
maxRunning
- expected number of tasks permitted to runmaxQueued
- expected number of tasks permitted to queuebulkheadMethod
- a reference to the annotated methodCopyright © 2020 Eclipse Foundation. All rights reserved.