Skip to content

Commit

Permalink
Fix ProcessingExceptionTest
Browse files Browse the repository at this point in the history
JUnit might run a test method in chain. In such a call chain the
stacktrace has duplicated elements.

Change-Id: Ibaf10baaa6610ec42a8a83b0371907ce7e6dac5c
  • Loading branch information
Ralph Steiner committed Apr 21, 2020
1 parent 13e51ed commit 1b5ba69
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ private void assertUniqueLinesOnStackTrace(Throwable t) {
// ignore omitted line counter
continue;
}
if (trimmedLine.startsWith("at org.junit.")) {
// junit runner chain
continue;
}
if (!processedLines.add(trimmedLine) && !duplicateLines.contains(trimmedLine)) {
duplicateLines.add(trimmedLine);
}
Expand Down

0 comments on commit 1b5ba69

Please sign in to comment.