public class ClientDeployer extends Object implements Deployer
Constructor and Description |
---|
ClientDeployer() |
Modifier and Type | Method and Description |
---|---|
void |
deploy(String name)
Deploy the named deployment.
|
InputStream |
getDeployment(String name)
Get the Deployment byte content.
|
void |
undeploy(String name)
UnDeploy a named deployment.
The operation will block until deploy is complete. |
public void deploy(String name)
Deployer
NOTE: If you want to run a test in a container, you cannot deploy a deployment from this test on the same container that the test is running in.
This is NOT correct for a test running in a container:
@Test @OperatesOnDeployment("X")
public void deployTest() {
deployer.deploy("X");
}
If you run the test in this way for the very first deployment the test will be launched on the client side. If you try to redeploy
a deployment from the container an exception will be thrown. In these cases please use the annotation RunAsClient
either
on the test method or on the whole test class to be sure, that the test is running on the client side.
NOTE: You can still (re)deploy a deployment on a different container than the test is running in.
This IS correct for a test running in a container:
@Test @OperatesOnDeployment("X")
public void deployTest() {
deployer.deploy("Y");
}
public void undeploy(String name)
Deployer
public InputStream getDeployment(String name)
Deployer
getDeployment
in interface Deployer
name
- The name of the Deployment as defined by DeploymentCopyright © 2017 JBoss by Red Hat. All rights reserved.