Search in sources :

Example 1 with GroupBuildClient

use of org.jboss.pnc.client.GroupBuildClient in project pnc by project-ncl.

the class WebSocketClientTest method groupBuildToFinish.

private Boolean groupBuildToFinish(String groupBuildId) {
    GroupBuild build = null;
    try {
        build = new GroupBuildClient(RestClientConfiguration.asUser()).getSpecific(groupBuildId);
        assertThat(build).isNotNull();
        if (!build.getStatus().isFinal())
            return false;
    } catch (RemoteResourceNotFoundException e) {
        fail(String.format("Group Build with id:%s not present", groupBuildId), e);
    } catch (ClientException e) {
        fail("Client has failed in an unexpected way.", e);
    }
    return true;
}
Also used : RemoteResourceNotFoundException(org.jboss.pnc.client.RemoteResourceNotFoundException) GroupBuild(org.jboss.pnc.dto.GroupBuild) GroupBuildClient(org.jboss.pnc.client.GroupBuildClient) ClientException(org.jboss.pnc.client.ClientException)

Aggregations

ClientException (org.jboss.pnc.client.ClientException)1 GroupBuildClient (org.jboss.pnc.client.GroupBuildClient)1 RemoteResourceNotFoundException (org.jboss.pnc.client.RemoteResourceNotFoundException)1 GroupBuild (org.jboss.pnc.dto.GroupBuild)1