Skip to content

Commit

Permalink
Fixing JENKINS-30259
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsNielsen committed Sep 2, 2015
1 parent 2cc3995 commit 3cf3056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/test/java/net/praqma/hudson/test/CCUCMRule.java
Expand Up @@ -12,6 +12,7 @@
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.logging.Level;
Expand Down Expand Up @@ -227,9 +228,9 @@ public FreeStyleProject setupProjectWithASlave( String projectName, PollingMode
System.out.println( "==== [Setting up ClearCase UCM project] ====" );
printInfo(projectName, mode.getPolling().getType().name(), component, stream, recommend, tag, description, mode.createBaselineEnabled(), forceDeliver, template, mode.getPromotionLevel() == null ? "ANY" : mode.getPromotionLevel().name());
FreeStyleProject project = createFreeStyleProject( "ccucm-" + projectName );
DumbSlave slave = createOnlineSlave();
DumbSlave slave = createOnlineSlave(Label.get(UUID.randomUUID().toString()));
project.setAssignedNode(slave);
System.out.println( " * Slave : " + slave.getSelfLabel().getName() );
System.out.println( " * Slave : " + slave.getLabelString() );
System.out.println( "============================================" );

this.scm = new CCUCMScm(component, "ALL", false, mode, stream, "successful", template, forceDeliver, recommend, tag, description, "", true, false, false);
Expand Down Expand Up @@ -352,12 +353,12 @@ public boolean perform( AbstractBuild<?, ?> build, Launcher launcher, BuildListe
AbstractBuild<?,?> build = null;
try {
build = project.scheduleBuild2(0, new Cause.UserIdCause(), action ).get();
} catch( Exception e ) {
} catch ( Exception e ) {
if(!fail) {
logger.log(Level.SEVERE, "Build failed...it should not!", e);
throw e;
}
logger.info( "Build failed, and it should!");
logger.info( "Build failed, and it should!");
}


Expand Down
Expand Up @@ -61,7 +61,7 @@ public void testRecommended() throws Exception {
.validateBuild(Result.SUCCESS)
.validateBuildView()
.validateBuiltBaseline(PromotionLevel.BUILT, baseline, false)
.validateCreatedBaseline(true)
.validateCreatedBaseline(true, true)
.validate();
}

Expand Down

0 comments on commit 3cf3056

Please sign in to comment.