use of org.jboss.pnc.common.util.ObjectWrapper in project pnc by project-ncl.
the class BuildExecutionTest method shouldNotContinueBuildOnMavenError.
@Test
public void shouldNotContinueBuildOnMavenError() throws ExecutorException, InterruptedException, TimeoutException {
BuildConfiguration buildConfiguration = configurationBuilder.buildFailingConfiguration(3, "build-failed-on-maven", null);
Set<BuildExecutionStatusChangedEvent> statusChangedEvents = new HashSet<>();
ObjectWrapper<BuildResult> buildExecutionResultWrapper = new ObjectWrapper<>();
runBuild(buildConfiguration, statusChangedEvents, buildExecutionResultWrapper);
checkBuildStatuses(statusChangedEvents, Arrays.asList(DONE_WITH_ERRORS, BUILD_ENV_DESTROYED, BUILD_ENV_DESTROYING));
assertNoState(statusChangedEvents, BuildExecutionStatus.COLLECTING_RESULTS_FROM_REPOSITORY_MANAGER);
}
use of org.jboss.pnc.common.util.ObjectWrapper in project pnc by project-ncl.
the class BuildCoordinationTest method registerCallback.
private ObjectWrapper<BuildSetStatus> registerCallback(BuildConfigurationSet buildConfigurationSet) {
ObjectWrapper<BuildSetStatus> lastBuildSetStatus = new ObjectWrapper<>();
Consumer<BuildSetStatusChangedEvent> onStatusUpdate = (statusChangedEvent) -> {
if (statusChangedEvent.getNewStatus().isCompleted()) {
lastBuildSetStatus.set(statusChangedEvent.getNewStatus());
}
};
BuildSetCallBack buildSetCallBack = new BuildSetCallBack(buildConfigurationSet.getId(), onStatusUpdate);
buildSetStatusNotifications.subscribe(buildSetCallBack);
return lastBuildSetStatus;
}
Aggregations