forked from jboss-eap-qe/eap-microprofile-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing throws Exception. Fixes jboss-eap-qe#194
- Loading branch information
1 parent
23d985b
commit 7ac5967
Showing
11 changed files
with
376 additions
and
129 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
tooling-docker/src/main/java/org/jboss/eap/qe/ts/common/docker/Container.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.jboss.eap.qe.ts.common.docker; | ||
|
||
/** | ||
* Describes public interface available for a container (not an Arquillian one but the operating system level | ||
* virtualization unit). | ||
*/ | ||
public interface Container { | ||
|
||
/** | ||
* Start this container | ||
* | ||
* @throws ContainerStartException thrown when start of container fails | ||
*/ | ||
void start() throws ContainerStartException; | ||
|
||
/** | ||
* @return Returns true if docker container is running. It does NOT check whether container is ready. | ||
*/ | ||
boolean isRunning(); | ||
|
||
/** | ||
* Stop this docker container using docker command. | ||
* | ||
* @throws ContainerStopException thrown when the stop command fails. This generally means that the command wasn't | ||
* successful and container might be still running. | ||
*/ | ||
void stop() throws ContainerStopException; | ||
|
||
/** | ||
* Kill this docker container using docker command. Be aware that there might occur a situation when the docker | ||
* command might fail. This might be caused for example by reaching file descriptors limit in system. | ||
* | ||
* @throws ContainerKillException thrown when the kill command fails. | ||
*/ | ||
void kill() throws ContainerKillException; | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
tooling-docker/src/main/java/org/jboss/eap/qe/ts/common/docker/ContainerKillException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jboss.eap.qe.ts.common.docker; | ||
|
||
/** | ||
* An exception thrown when killing a container fails | ||
*/ | ||
public class ContainerKillException extends Exception { | ||
|
||
public ContainerKillException() { | ||
super(); | ||
} | ||
|
||
public ContainerKillException(String message) { | ||
super(message); | ||
} | ||
|
||
public ContainerKillException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ContainerKillException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
7 changes: 6 additions & 1 deletion
7
...ker/src/main/java/org/jboss/eap/qe/ts/common/docker/ContainerReadyConditionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
package org.jboss.eap.qe.ts.common.docker; | ||
|
||
public class ContainerReadyConditionException extends RuntimeException { | ||
/** | ||
* An exception thrown when checking for container readiness fails | ||
*/ | ||
public class ContainerReadyConditionException extends Exception { | ||
|
||
public ContainerReadyConditionException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
tooling-docker/src/main/java/org/jboss/eap/qe/ts/common/docker/ContainerRemoveException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jboss.eap.qe.ts.common.docker; | ||
|
||
/** | ||
* An exception thrown when container removal fails | ||
*/ | ||
public class ContainerRemoveException extends Exception { | ||
|
||
public ContainerRemoveException() { | ||
super(); | ||
} | ||
|
||
public ContainerRemoveException(String message) { | ||
super(message); | ||
} | ||
|
||
public ContainerRemoveException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ContainerRemoveException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tooling-docker/src/main/java/org/jboss/eap/qe/ts/common/docker/ContainerStartException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jboss.eap.qe.ts.common.docker; | ||
|
||
/** | ||
* An exception thrown when container start fails | ||
*/ | ||
public class ContainerStartException extends Exception { | ||
|
||
public ContainerStartException() { | ||
super(); | ||
} | ||
|
||
public ContainerStartException(String message) { | ||
super(message); | ||
} | ||
|
||
public ContainerStartException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ContainerStartException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tooling-docker/src/main/java/org/jboss/eap/qe/ts/common/docker/ContainerStopException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.jboss.eap.qe.ts.common.docker; | ||
|
||
/** | ||
* An exception thrown when container stop fails | ||
*/ | ||
public class ContainerStopException extends Exception { | ||
|
||
public ContainerStopException() { | ||
super(); | ||
} | ||
|
||
public ContainerStopException(String message) { | ||
super(message); | ||
} | ||
|
||
public ContainerStopException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ContainerStopException(Throwable cause) { | ||
super(cause); | ||
} | ||
} |
Oops, something went wrong.