Skip to content
Permalink
Browse files
Merge pull request #14 from MadsNielsen/master
Fixed failing test for JENKINS-19558
  • Loading branch information
MadsNielsen committed Nov 19, 2013
2 parents 85279be + ac8a77d commit c9a597f5acb2fe8afc575aa66ef93beb6242dd35
@@ -128,5 +128,7 @@ public void setActHeadline( String actHeadline ) {
public String getActHeadline() {
return actHeadline;
}



}
@@ -7,6 +7,8 @@
import net.praqma.clearcase.test.junit.ClearCaseRule;
import net.praqma.clearcase.ucm.entities.Stream;
import net.praqma.hudson.CCUCMBuildAction;
import net.praqma.hudson.scm.ChangeLogEntryImpl;
import net.praqma.hudson.scm.ChangeLogSetImpl;
import net.praqma.hudson.test.BaseTestClass;
import net.praqma.hudson.test.CCUCMRule;
import net.praqma.hudson.test.SystemValidator;
@@ -32,10 +34,19 @@ public void jenkins19558() throws Exception {
Project project = new CCUCMRule.ProjectCreator( "JENKINS-19558", "_System@" + ccenv.getPVob(), "one_int@" + ccenv.getPVob() ).setSwipe( false ).setType( CCUCMRule.ProjectCreator.Type.child ).getProject();

/* I need a first build */

AbstractBuild build1 = jenkins.getProjectBuilder( project ).build();
CCUCMBuildAction action1 = build1.getAction( CCUCMBuildAction.class );
action1.getViewPath();


ChangeLogSetImpl climpl = (ChangeLogSetImpl)build1.getChangeSet();

for(ChangeLogEntryImpl itam : climpl.getEntries()) {
System.out.println("Activity name: "+ itam.getMsg());
for(String s: itam.getAffectedPaths()) {
System.out.println("Changed file: "+s);
}
}

Stream target = ccenv.context.streams.get( "one_int" );
Stream source = ccenv.context.streams.get( "one_dev" );

@@ -44,18 +55,23 @@ public void jenkins19558() throws Exception {
System.out.println( "PATH: " + action1.getViewPath() );
System.out.println( "TAG: " + action1.getViewTag() );
Deliver deliver = new Deliver( source, target, action1.getViewPath(), action1.getViewTag() );
boolean b = deliver.deliver( true, false, false, false );
System.out.println( "DELIVER: " + b );

boolean b = deliver.deliver( true, false, false, false );
System.out.println( "We just ran a deliver behind the scenes, but did not complete");
System.out.println( "DELIVERED: " + b );

AbstractBuild build2 = jenkins.getProjectBuilder( project ).build();

System.out.println( "1CHANGE LOG: " + build2.getChangeSet() );
System.out.println( "1CHANGE LOG: " + build2.getChangeSet().getClass() );

ChangeLogSetImpl climpl2 = (ChangeLogSetImpl)build2.getChangeSet();
for(ChangeLogEntryImpl itam : climpl2.getEntries()) {
System.out.println("Activity name: "+ itam.getMsg());
for(String s: itam.getAffectedPaths()) {
System.out.println("Changed file: "+s);
}
}

new SystemValidator( build2 ).
validateBuild( Result.FAILURE ).
checkChangeset( 2 ).
checkChangeset( 1 ).
validate();
}

0 comments on commit c9a597f

Please sign in to comment.