Skip to content

Commit

Permalink
[SUREFIRE-2278] Don't say please. (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored Oct 16, 2024
1 parent 68b0528 commit f144b13
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ private static String createErrorMessage(
.append(reportParameters.getFailOnFlakeCount())
.append(".");
}
msg.append("\n\nPlease refer to ")
msg.append("\n\nSee ")
.append(reportParameters.getReportsDirectory())
.append(" for the individual test results.")
.append('\n')
.append("Please refer to dump files (if any exist) ")
.append("See dump files (if any exist) ")
.append(DUMP_FILES_PRINT[0])
.append(", ")
.append(DUMP_FILES_PRINT[1])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ public void shouldHandleFailIfNoTests() throws Exception {
public void shouldHandleTestFailure() throws Exception {
RunResult summary = new RunResult(1, 0, 1, 0);
e.expect(MojoFailureException.class);
e.expectMessage("There are test failures.\n\nPlease refer to null "
+ "for the individual test results.\nPlease refer to dump files (if any exist) "
e.expectMessage("There are test failures.\n\nSee null "
+ "for the individual test results.\nSee dump files (if any exist) "
+ "[date].dump, [date]-jvmRun[N].dump and [date].dumpstream.");
reportExecution(new Mojo(), summary, null, null);
}
Expand All @@ -175,8 +175,8 @@ public void failsIfThereAreTooManyFlakes() throws Exception {
Mojo reportParameters = new Mojo();
reportParameters.setFailOnFlakeCount(1);
e.expect(MojoFailureException.class);
e.expectMessage("There is 1 flake and failOnFlakeCount is set to 1.\n\nPlease refer to null "
+ "for the individual test results.\nPlease refer to dump files (if any exist) "
e.expectMessage("There is 1 flake and failOnFlakeCount is set to 1.\n\nSee null "
+ "for the individual test results.\nSee dump files (if any exist) "
+ "[date].dump, [date]-jvmRun[N].dump and [date].dumpstream.");
reportExecution(reportParameters, summary, null, null);
}
Expand All @@ -188,8 +188,8 @@ public void reportsFailuresAndFlakes() throws Exception {
reportParameters.setFailOnFlakeCount(1);
e.expect(MojoFailureException.class);
e.expectMessage("There are test failures.\nThere are 2 flakes and failOnFlakeCount is set to 1."
+ "\n\nPlease refer to null "
+ "for the individual test results.\nPlease refer to dump files (if any exist) "
+ "\n\nSee null "
+ "for the individual test results.\nSee dump files (if any exist) "
+ "[date].dump, [date]-jvmRun[N].dump and [date].dumpstream.");
reportExecution(reportParameters, summary, null, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ public void testTestFailure() throws Exception {
mojo.handleSummary(runResult, null);
} catch (MojoFailureException e) {
assertThat(e.getLocalizedMessage())
.isEqualTo("There are test failures.\n\nPlease refer to null "
+ "for the individual test results.\nPlease refer to dump files (if any exist) "
.isEqualTo("There are test failures.\n\nSee null "
+ "for the individual test results.\nSee dump files (if any exist) "
+ "[date].dump, [date]-jvmRun[N].dump and [date].dumpstream.");
return;
}
fail("Expected MojoFailureException with message "
+ "'There are test failures.\n\nPlease refer to null "
+ "for the individual test results.\nPlease refer to dump files (if any exist) "
+ "'There are test failures.\n\nSee null "
+ "for the individual test results.\nSee dump files (if any exist) "
+ "[date].dump, [date]-jvmRun[N].dump and [date].dumpstream.'");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private static String createMessageForMissingRunOrder(String name) {
RunOrder[] runOrders = values();
StringBuilder message = new StringBuilder("There's no RunOrder with the name ");
message.append(name);
message.append(". Please use one of the following RunOrders: ");
message.append(". Use one of the following RunOrders: ");
for (int i = 0; i < runOrders.length; i++) {
if (i != 0) {
message.append(", ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/**
* Since SUREFIRE 2.18 this class is deprecated.
* Please use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
* Use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
*
* @author <a href="mailto:kristian@zenior.no">Kristian Rosenvold</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

/**
* Since SUREFIRE 2.18 this class is deprecated.
* Please use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
* Use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
*
* @author Kristian Rosenvold
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* Since SUREFIRE 2.18 this class is deprecated.
* Please use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
* Use {@link org.apache.maven.surefire.junitcore.pc.ParallelComputerBuilder} instead.
*
* @author <a href="mailto:kristian@zenior.no">Kristian Rosenvold</a>
*/
Expand Down

0 comments on commit f144b13

Please sign in to comment.