Skip to content

Commit

Permalink
Merge pull request #31496 from gsmet/ProviderConfigInjectionWarningsTest
Browse files Browse the repository at this point in the history
Filter out RESTEasy related warning in ProviderConfigInjectionWarningsTest
  • Loading branch information
gsmet authored Mar 2, 2023
2 parents 8a23e25 + ea36149 commit 1215c9f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ 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());
Set<String> messages = logRecords.stream()
.map(LogRecord::getMessage)
// filter out noise coming from RESTEasy
.filter(m -> !m.contains("RESTEASY004687"))
.collect(Collectors.toSet());

for (String message : messages) {
System.out.println("Message from ProviderConfigInjectionWarningsTest: " + message);
}

assertEquals(4, logRecords.size());
assertEquals(4, messages.size());
assertTrue(messages.contains(
"Directly injecting a org.eclipse.microprofile.config.Config into a jakarta.ws.rs.ext.Provider may lead to unexpected results. To ensure proper results, please change the type of the field to jakarta.enterprise.inject.Instance<org.eclipse.microprofile.config.Config>. Offending field is 'config' of class 'io.quarkus.resteasy.test.config.ProviderConfigInjectionWarningsTest$FooProvider'"));
assertTrue(messages.contains(
Expand Down

0 comments on commit 1215c9f

Please sign in to comment.