use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.
the class StatefulEJBRemoteHomeRuntimeNameTestCase method testStatefulLocalHome.
@Test
@InSequence(value = 2)
public void testStatefulLocalHome() throws Exception {
SimpleStatefulHome home = (SimpleStatefulHome) context.lookup(getEJBHomeJNDIBinding());
SimpleInterface ejbInstance = home.createSimple("Hello World");
Assert.assertEquals("Hello World", ejbInstance.sayHello());
home = (SimpleStatefulHome) ejbInstance.getEJBHome();
ejbInstance = home.createSimple("Hello World");
Assert.assertEquals("Hello World", ejbInstance.sayHello());
}
use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.
the class StatelessEJBRemoteHomeRuntimeNameTestCase method testStepByStep.
@Test
@InSequence(value = 3)
public void testStepByStep() throws Exception {
ModelNode readResource = new ModelNode();
readResource.get(ModelDescriptionConstants.ADDRESS).add(ModelDescriptionConstants.DEPLOYMENT, DEPLOYMENT_NAME);
readResource.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.READ_RESOURCE_OPERATION);
readResource.get(ModelDescriptionConstants.INCLUDE_RUNTIME).set(true);
ModelNode result = controllerClient.execute(readResource);
// just to blow up
Assert.assertTrue("Failed to list resources: " + result, Operations.isSuccessfulOutcome(result));
readResource.get(ModelDescriptionConstants.ADDRESS).add(ModelDescriptionConstants.SUBDEPLOYMENT, SUB_DEPLOYMENT_NAME);
result = controllerClient.execute(readResource);
// just to blow up
Assert.assertTrue("Failed to list resources: " + result, Operations.isSuccessfulOutcome(result));
readResource.get(ModelDescriptionConstants.ADDRESS).add(ModelDescriptionConstants.SUBSYSTEM, "ejb3");
result = controllerClient.execute(readResource);
// just to blow up
Assert.assertTrue("Failed to list resources: " + result, Operations.isSuccessfulOutcome(result));
readResource.get(ModelDescriptionConstants.ADDRESS).add(EJB_TYPE, BEAN_CLASS.getSimpleName());
result = controllerClient.execute(readResource);
// just to blow up
Assert.assertTrue("Failed to list resources: " + result, Operations.isSuccessfulOutcome(result));
}
use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.
the class StatelessEJBRemoteHomeRuntimeNameTestCase method testRecursive.
@Test
@InSequence(value = 4)
public void testRecursive() throws Exception {
ModelNode readResource = new ModelNode();
readResource.get(ModelDescriptionConstants.ADDRESS).add(ModelDescriptionConstants.DEPLOYMENT, DEPLOYMENT_NAME);
readResource.get(ModelDescriptionConstants.OP).set(ModelDescriptionConstants.READ_RESOURCE_OPERATION);
readResource.get(ModelDescriptionConstants.INCLUDE_RUNTIME).set(true);
readResource.get(ModelDescriptionConstants.RECURSIVE).set(true);
ModelNode result = controllerClient.execute(readResource);
// just to blow up
Assert.assertTrue("Failed to list resources: " + result, Operations.isSuccessfulOutcome(result));
}
use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.
the class ServletRunAsTestCase method runServletWithIncorrectRole.
/**
* Access Servlet which uses RunAs with different role than in needed for secured EJB invocation.
* <p>
* This method will run init() and doGet() method and stores results.
*
* @param url
* @throws Exception
*/
@Test
@InSequence(4)
@OperateOnDeployment(DEPLOYMENT)
public void runServletWithIncorrectRole(@ArquillianResource URL url) throws Exception {
final URL servletUrl = new URL(url.toExternalForm() + RunAsUserServlet.SERVLET_PATH.substring(1) + "?" + Utils.encodeQueryParam(CallProtectedEjbServlet.FILE_PARAM, INCORRECT_ROLE_AND_UNDEPLOY.getAbsolutePath()));
incorrectRoleResult = Utils.makeCall(servletUrl.toURI(), HTTP_OK);
}
use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.
the class ClusteredJPA2LCTestCase method setupCacheContainer.
@Test
@InSequence(-1)
public void setupCacheContainer() throws IOException {
NodeUtil.start(controller, CONTAINERS);
final ModelNode createEntityReplicatedCacheOp = new ModelNode();
createEntityReplicatedCacheOp.get(ADDRESS).set(CACHE_ADDRESS);
createEntityReplicatedCacheOp.get(OP).set(ADD);
createEntityReplicatedCacheOp.get("mode").set("sync");
client0 = createClient0();
client1 = createClient1();
final ModelNode result0 = client0.execute(createEntityReplicatedCacheOp);
Assert.assertTrue(result0.toJSONString(false), result0.get(OUTCOME).asString().equals(SUCCESS));
final ModelNode result1 = client1.execute(createEntityReplicatedCacheOp);
Assert.assertTrue(result1.toJSONString(false), result1.get(OUTCOME).asString().equals(SUCCESS));
NodeUtil.deploy(this.deployer, DEPLOYMENTS);
}
Aggregations