diff --git a/src/test/java/hudson/plugins/jacococoveragecolumn/AbstractJaCoCoCoverageColumnTest.java b/src/test/java/hudson/plugins/jacococoveragecolumn/AbstractJaCoCoCoverageColumnTest.java index db71d6f6..8574f60f 100644 --- a/src/test/java/hudson/plugins/jacococoveragecolumn/AbstractJaCoCoCoverageColumnTest.java +++ b/src/test/java/hudson/plugins/jacococoveragecolumn/AbstractJaCoCoCoverageColumnTest.java @@ -89,9 +89,10 @@ public MyRun getLastSuccessfulBuild() { } } - @Override - protected synchronized void saveNextBuildNumber() { - } + @Override + public int assignBuildNumber() throws IOException { + return nextBuildNumber++; + } }; assertTrue(abstractJaCoCoCoverageColumn.hasCoverage(mockJob)); assertEquals("66.67", abstractJaCoCoCoverageColumn.getPercent(mockJob)); @@ -218,8 +219,9 @@ public MyRun getLastSuccessfulBuild() { } @Override - protected synchronized void saveNextBuildNumber() { - } + public int assignBuildNumber() throws IOException { + return nextBuildNumber++; + } } private class MyJob extends Job { diff --git a/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java b/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java index 64f07a9c..fff653f6 100644 --- a/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java +++ b/src/test/java/hudson/plugins/jacococoveragecolumn/BranchCoverageColumnTest.java @@ -57,9 +57,10 @@ public MyRun getLastSuccessfulBuild() { } } - @Override - protected synchronized void saveNextBuildNumber() { - } + @Override + public int assignBuildNumber() throws IOException { + return nextBuildNumber++; + } }; assertEquals("66.67", sut.getPercent(mockJob)); diff --git a/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java b/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java index 52aeb99c..b31ef78e 100644 --- a/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java +++ b/src/test/java/hudson/plugins/jacococoveragecolumn/JaCoCoColumnTest.java @@ -56,9 +56,10 @@ public MyRun getLastSuccessfulBuild() { } } - @Override - protected synchronized void saveNextBuildNumber() { - } + @Override + public int assignBuildNumber() throws IOException { + return nextBuildNumber++; + } }; assertTrue(jaCoCoColumn.hasCoverage(mockJob)); assertEquals("33.33", jaCoCoColumn.getPercent(mockJob));