|
|||||||||
|
|||||||||
DocumentationContainers
Get InvolvedFeeds
|
DefinitionTimeout after which the container start/stop is deemed failed
ExplanationCargo has a timeout for container start and stop operations. If the time taken to start/stop a container exceeds the timeout period the operations is considered failed and the container is then set in the unknown state. The default timeout value is 2 minutes (120000 milliseconds). This value can be modified as shown below.
Example using the Java APILocalContainer container = ...;
container.setTimeout(180000L);
System.out.println("Timeout = " + container.getTimeout());
Example using the Maven 2 plugin<container> [...] <timeout>180000</timeout> [...] </container> Disabling timeoutIf you set the timeout to Using different timeouts when starting and stopping the containerShutdown usually takes much much shorther than startup, it therefore often makes sense to use a shorter timeout for stopping the container than for starting it. With the Cargo Maven2 plugin, this is easy to do: indeed, in each Here is an example that uses different timeouts when starting and stopping the container: <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>
|
||||||||
| |||||||||