Skip to content
Permalink
Browse files

bring jenkins.version forward to something that supports java8

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 08f936a53b9b443fb3c04449c7f389814d118cbe
Showing with 19 additions and 4 deletions.
  1. +16 −1 pom.xml
  2. +3 −3 src/test/java/hudson/plugins/view/dashboard/test/TestSummaryForMatrixJobs.java
17 pom.xml
@@ -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>
@@ -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>
@@ -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>
@@ -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>

@@ -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
@@ -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)));

0 comments on commit 08f936a

Please sign in to comment.
You can’t perform that action at this time.