Skip to content

Commit

Permalink
Filter out RESTEasy related warning in ProviderConfigInjectionWarning…
Browse files Browse the repository at this point in the history
…sTest

We sometimes have RESTEasy complaining about an Apache HTTP Client not
being closed.
  • Loading branch information
gsmet committed Mar 1, 2023
1 parent cfbb0a4 commit a74055d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ public class ProviderConfigInjectionWarningsTest {
static final QuarkusUnitTest TEST = new QuarkusUnitTest()
.setLogRecordPredicate(record -> record.getLevel().intValue() >= Level.WARNING.intValue())
.assertLogRecords(logRecords -> {
Set<String> messages = logRecords.stream().map(LogRecord::getMessage).collect(Collectors.toSet());

for (String message : messages) {
System.out.println("Message from ProviderConfigInjectionWarningsTest: " + message);
}
Set<String> messages = logRecords.stream()
.map(LogRecord::getMessage)
// filter out noise coming from RESTEasy
.filter(m -> !m.contains("RESTEASY004687"))
.collect(Collectors.toSet());

assertEquals(4, logRecords.size());
assertTrue(messages.contains(
Expand Down

0 comments on commit a74055d

Please sign in to comment.