use of org.wildfly.swarm.arquillian.StartupTimeout in project wildfly-swarm by wildfly-swarm.
the class WildFlySwarmContainer method deploy.
@Override
public synchronized ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException {
StartupTimeout startupTimeout = this.testClass.getAnnotation(StartupTimeout.class);
if (startupTimeout != null) {
setTimeout(startupTimeout.value());
}
this.delegateContainer = new UberjarSimpleContainer(this.containerContext.get(), this.deploymentContext.get(), this.testClass);
try {
this.delegateContainer.setJavaVmArguments(this.getJavaVmArguments()).requestedMavenArtifacts(this.requestedMavenArtifacts).start(archive);
// start wants to connect to the remote container, which isn't up until now, so
// we override start above and call it here instead
super.start();
ProtocolMetaData metaData = new ProtocolMetaData();
metaData.addContext(createDeploymentContext(archive.getId()));
return metaData;
} catch (Throwable e) {
if (e instanceof LifecycleException) {
e = e.getCause();
}
throw new DeploymentException(e.getMessage(), e);
}
}
Aggregations