Definition
| Excerpt |
|---|
Timeout after which the container start/stop is deemed failed |
| Info |
|---|
This feature is only available for local containers |
...
| Note |
|---|
If the given timeout is too small, the CARGO container will give you an error message similar to this: | Code Block |
|---|
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to start the JBoss 5.1.0 container.
Deployable http://localhost:8080/cargocpc/index.html failed to finish deploying
within the timeout period [5000]. The Deployable state is thus unknown.
[INFO] ------------------------------------------------------------------------
|
|
Example using the Java API
| Code Block |
|---|
LocalContainer container = ...;
container.setTimeout(180000L);
System.out.println("Timeout = " + container.getTimeout());
|
Example using the Maven 2 plugin
| Code Block |
|---|
|
<container>
[...]
<timeout>180000</timeout>
[...]
</container>
|
Disabling timeout
As of CARGO version 1.0.2, if If you set the timeout to to 0, CARGO will not wait for the container to start or stop.
...
Here is an example that uses different timeouts when starting and stopping the container:
| Code Block |
|---|
|
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<timeout>60000</timeout>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
<configuration>
<timeout>10000</timeout>
</configuration>
</execution>
</executions>
<configuration>
[...]
</configuration>
</plugin>
|