Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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