Permalink
Browse files

Reverted imports to original style, adapted test for [JENKINS-11828]

  • Loading branch information...
fredg02 committed Nov 28, 2011
1 parent 2571d55 commit 781095924528496b3ec7998a625808875c5215c0
@@ -27,8 +27,12 @@
import hudson.Extension;
import hudson.matrix.MatrixConfiguration;
import hudson.matrix.MatrixRun;
import hudson.model.*;
import hudson.model.Result;
import hudson.model.Descriptor;
import hudson.model.Cause;
import hudson.model.Cause.UpstreamCause;
import hudson.model.Job;
import hudson.model.Run;
import org.kohsuke.stapler.DataBoundConstructor;

/**
@@ -65,6 +65,7 @@
import org.jvnet.hudson.test.ExtractResourceSCM;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.CaptureEnvironmentBuilder;
import org.jvnet.hudson.test.FailureBuilder;
import org.jvnet.hudson.test.UnstableBuilder;
import org.jvnet.hudson.test.recipes.LocalData;

@@ -504,6 +505,12 @@ public void testTriggeredBuildSelector() throws Exception {
// Verify error if build not triggered by upstream job:
assertBuildStatus(Result.FAILURE, p.scheduleBuild2(0, new UserCause()).get());
// test fallback

//run a failing build to make sure the fallback selects the last successful build
other.getPublishersList().clear();
other.getBuildersList().add(new FailureBuilder());
assertBuildStatus(Result.FAILURE, other.scheduleBuild2(0, new UserCause()).get());

p.getBuildersList().remove(CopyArtifact.class);
p.getBuildersList().add(new CopyArtifact(other.getName(),
new TriggeredBuildSelector(true), "*.txt", "", false, false));

0 comments on commit 7810959

Please sign in to comment.