Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Override assignBuildNumber rather than saveNextBuildNumber #291

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ public MyRun getLastSuccessfulBuild() {
}
}

@Override
protected synchronized void saveNextBuildNumber() {
}
@Override
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore WS (tabs).

public int assignBuildNumber() throws IOException {
return nextBuildNumber++;
}
};
assertTrue(abstractJaCoCoCoverageColumn.hasCoverage(mockJob));
assertEquals("66.67", abstractJaCoCoCoverageColumn.getPercent(mockJob));
Expand Down Expand Up @@ -218,8 +219,9 @@ public MyRun getLastSuccessfulBuild() {
}

@Override
protected synchronized void saveNextBuildNumber() {
}
public int assignBuildNumber() throws IOException {
return nextBuildNumber++;
}
}

private class MyJob extends Job<MyJob,MyRun> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down