Skip to content

Commit

Permalink
[WLFY-1518] HornetQBackupActivationTestCase intermittent failure
Browse files Browse the repository at this point in the history
swallow up the underlying ExecutionException on :reload operation
execution (when the server is reloaded, the client may lose the
connection before the operation result returns).
  • Loading branch information
jmesnil authored and jaikiran committed Jun 14, 2013
1 parent 168a872 commit 97ed057
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.concurrent.ExecutionException;

import org.jboss.arquillian.container.test.api.ContainerController;
import org.jboss.arquillian.container.test.api.RunAsClient;
Expand Down Expand Up @@ -250,7 +251,16 @@ private void reload(ModelControllerClient client) throws IOException {
operation.get(OP_ADDR).setEmptyList();
operation.get(OP).set("reload");
operation.get("blocking").set(true);
execute(client, operation);
try {
execute(client, operation);
} catch(IOException e) {
final Throwable cause = e.getCause();
if (cause instanceof ExecutionException) {
// ignore, this might happen if the channel gets closed before we got the response
} else {
throw e;
}
}
}

private static void waitForHornetQServerActivation(ModelControllerClient client, boolean expectedActive, int timeout) throws IOException {
Expand Down

0 comments on commit 97ed057

Please sign in to comment.