Skip to content

Commit

Permalink
Fix log assertions
Browse files Browse the repository at this point in the history
This should not prevent Quarkus from shutting down
  • Loading branch information
stuartwdouglas committed Sep 6, 2021
1 parent 9eb3e8b commit 31138b0
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,9 @@ private Throwable unwrapException(Throwable cause) {
public void afterAll(ExtensionContext extensionContext) throws Exception {
actualTestClass = null;
actualTestInstance = null;
List<LogRecord> records = null;
if (assertLogRecords != null) {
assertLogRecords.accept(inMemoryLogHandler.records);
records = new ArrayList<>(inMemoryLogHandler.records);
}
rootLogger.setHandlers(originalHandlers);
inMemoryLogHandler.clearRecords();
Expand Down Expand Up @@ -606,9 +607,12 @@ public void afterAll(ExtensionContext extensionContext) throws Exception {
if (afterAllCustomizer != null) {
afterAllCustomizer.run();
}
ClearCache.clearAnnotationCache();
GroovyCacheCleaner.clearGroovyCache();
}
if (records != null) {
assertLogRecords.accept(records);
}
ClearCache.clearAnnotationCache();
GroovyCacheCleaner.clearGroovyCache();
}

@Override
Expand Down

0 comments on commit 31138b0

Please sign in to comment.