Skip to content

Commit

Permalink
bring jenkins.version forward to something that supports java8
Browse files Browse the repository at this point in the history
See JENKINS-22159 and related linked issues.  The problems are
generally spooky and don't make a lot of sense at face value
(ArrayIndexOutOfBoundsException).

NOTE: The jenkins plugin now inserts it's own sanity checks into
plugins.  These are left disabled for now (spoiler alert: they fail).
  • Loading branch information
cburroughs committed Feb 18, 2016
1 parent 78fb82b commit 08f936a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
17 changes: 16 additions & 1 deletion pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.509.4</version>
<version>2.3</version>
</parent>

<artifactId>dashboard-view</artifactId>
Expand All @@ -17,6 +17,7 @@
<url>http://wiki.jenkins-ci.org/display/JENKINS/Dashboard+View</url>

<properties>
<jenkins.version>1.554.1</jenkins.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -81,6 +82,12 @@
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>${jenkins.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -100,6 +107,14 @@
<failOnError>false</failOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<version>${hpi-plugin.version}</version>
<configuration>
<disabledTestInjection>true</disabledTestInjection>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Expand Up @@ -24,13 +24,13 @@

public class TestSummaryForMatrixJobs {
@Rule
public JenkinsRule jenkins = new JenkinsRule();
public JenkinsRule j = new JenkinsRule();

private MatrixProject matrixProject;

@Before
public void createMatrixJob() throws IOException {
matrixProject = jenkins.createMatrixProject("top");
matrixProject = j.jenkins.createProject(MatrixProject.class, "top");
matrixProject.getAxes().add(new TextAxis("param", "one", "two"));
matrixProject.getBuildersList().add(new TestBuilder() {
@Override
Expand All @@ -45,7 +45,7 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
@Test
public void summaryIncludesMatrixJobs() throws Exception {
MatrixBuild result = matrixProject.scheduleBuild2(0).get();
jenkins.assertBuildStatus(Result.UNSTABLE, result);
j.assertBuildStatus(Result.UNSTABLE, result);

TestResultSummary testSummary = TestUtil.getTestResultSummary(Collections.singleton((TopLevelItem) matrixProject));
assertThat(testSummary.getFailed(), is((2)));
Expand Down

0 comments on commit 08f936a

Please sign in to comment.