Skip to content

Commit

Permalink
Reverted imports to original style, adapted test for [JENKINS-11828]
Browse files Browse the repository at this point in the history
  • Loading branch information
fredg02 committed Nov 28, 2011
1 parent 2571d55 commit 7810959
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Expand Up @@ -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;

/**
Expand Down
Expand Up @@ -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;

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 7810959

Please sign in to comment.