@Override public DeploymentGroupStatus call() throws Exception { final DeploymentGroupStatusResponse response = getOrNull( client.deploymentGroupStatus(name)); if (response != null) { final DeploymentGroupStatus status = response.getDeploymentGroupStatus(); final DeploymentGroupStatus.State actual = status.getState(); // The deployment group failed when we did not expect it to. if (actual == FAILED && actual != expected) { throw new AssertionError("Deployment group " + name + " failed unexpectedly: " + status.getError()); } // The deployment group reached our desired status. if (actual == expected) { return status; } } return null; } });
final String error = deploymentGroupStatus == null ? "" : deploymentGroupStatus.getError(); return Response.ok(new DeploymentGroupStatusResponse( deploymentGroup, status, error, result, deploymentGroupStatus)).build();
final String error = deploymentGroupStatus == null ? "" : deploymentGroupStatus.getError(); return Response.ok(new DeploymentGroupStatusResponse( deploymentGroup, status, error, result, deploymentGroupStatus)).build();