Skip to content

Commit 282f119

Browse files
committed
refs spotbugs#60: throw AssertionError when bugReporter has Error
1 parent c5cc053 commit 282f119

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

findbugs/src/test/java/edu/umd/cs/findbugs/AbstractIntegrationTest.java

+7
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ protected void performAnalysis(@SlashedClassName final String... analyzeMe) {
138138
} catch (final IOException | InterruptedException e) {
139139
fail("Analysis failed with exception; " + e.getMessage());
140140
}
141+
if (! bugReporter.getQueuedErrors().isEmpty()) {
142+
AssertionError assertionError = new AssertionError("Analysis failed with exception. Check stderr for detail.");
143+
bugReporter.getQueuedErrors().stream()
144+
.map(error -> error.getCause())
145+
.forEach(assertionError::addSuppressed);
146+
throw assertionError;
147+
}
141148
}
142149

143150
private static final class CountMatcher<T> extends BaseMatcher<Iterable<T>> {

0 commit comments

Comments
 (0)