Skip to content

Commit

Permalink
[JENKINS-42009] Bump plugin version for PCT. Make some tests more rea…
Browse files Browse the repository at this point in the history
…listic.
  • Loading branch information
Evaristo Gutiérrez committed Feb 14, 2017
1 parent 1a964d9 commit 3ed2727
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion pom.xml
Expand Up @@ -124,7 +124,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>2.1.0</version>
<version>2.1.11</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -143,6 +143,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>subversion</artifactId>
Expand Down
9 changes: 5 additions & 4 deletions src/test/java/integration/EventsTest.java
Expand Up @@ -794,7 +794,7 @@ public void given_multibranchWithSources_when_branchChangeEvent_then_branchFromE
FreeStyleProject master = prj.getItem("master");
assertThat("We now have the master branch", master, notNullValue());
FreeStyleProject feature = prj.getItem("feature");
assertThat("We now have the feature branch", master, notNullValue());
assertThat("We now have the feature branch", feature, notNullValue());
assertThat("We only have the master and feature branches",
prj.getItems(), containsInAnyOrder(master, feature));
r.waitUntilNoActivity();
Expand All @@ -806,7 +806,8 @@ public void given_multibranchWithSources_when_branchChangeEvent_then_branchFromE
c.addFile("foo", "master", "Adding README.md", "README.md", "This is the readme".getBytes());
c.addFile("foo", "feature", "Adding README.adoc", "README.adoc", "This is the readme".getBytes());
r.waitUntilNoActivity();
assertThat("No events means no new builds", master.getLastBuild().getNumber(), is(1));
assertThat("No events means no new builds in master branch", master.getLastBuild().getNumber(), is(1));
assertThat("No events means no new builds in feature branch", feature.getLastBuild().getNumber(), is(1));

fire(new MockSCMHeadEvent(SCMEvent.Type.UPDATED, c, "foo", "master", "junkHash"));
assertThat("The master branch was built from event", master.getLastBuild().getNumber(), is(2));
Expand Down Expand Up @@ -883,7 +884,8 @@ public void given_multibranchWithSourcesAndTwoBranches_when_indexing_then_deadBr
r.waitUntilNoActivity();
assertThat("Indexing applies dead branch cleanup",
prj.getItems(), containsInAnyOrder(master));

assertThat("Indexing applies dead branch cleanup",
prj.getItems(), not(containsInAnyOrder(feature)));
}
}

Expand Down Expand Up @@ -1199,7 +1201,6 @@ public void given_orgFolder_when_someReposMatch_then_scanCreatesMatchingProjects
prj.getItems(),
Matchers.<MultiBranchProject<?, ?>>containsInAnyOrder(foo));
assertThat("The matching branch exists", foo.getItem("master"), notNullValue());

}
}

Expand Down

0 comments on commit 3ed2727

Please sign in to comment.