- assertThat(logs.contains(infoLogLevel)).isTrue();
- Predicate<String> datePattern = Pattern.compile("\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2},\\d{3}").asPredicate();
- assertThat(datePattern.test(logs)).isTrue();
- assertThat(logs.contains("cdi, resteasy, smallrye-context-propagation, vertx, websockets")).isTrue();
- assertThat(logs.contains("JBoss Threads version")).isFalse();
+ assertThat(logs).contains(infoLogLevel);
+ assertThat(logs).containsPattern("\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2},\\d{3}");
+ assertThat(logs).contains("cdi, rest, smallrye-context-propagation, vertx, websockets");
+ assertThat(logs).doesNotContain("JBoss Threads version");
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo9Fi4DiabFwbJqGTbem5c5VGXrJnTzLNU%2BDP69EKyJTrA%40mail.gmail.com.
Georgios Andrianakis
Independent Contractor
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-kMTzuArvAYzQkQPYBkhXc5ji4nMJRPoHgp8Lyv1HU3Yw%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CAOaD6k%2BY2ynRBvzQgCU4ktY71TJEHCB2_zQeOvMKUzfyA%3Dghjg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-kuMwf6mfunaNHhk7uf90WF0rfNw2v6AvjqMNdYhWOQ3w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo9Fi4DiabFwbJqGTbem5c5VGXrJnTzLNU%2BDP69EKyJTrA%40mail.gmail.com.
It's really unfortunate that your example involved searching logs textually, because that is something we really need to do fundamentally differently. It's very brittle: if we change log formatting for example, there's a decent chance of breaking 1000+ tests, and for no reason other than the fact that the logs are searched textually instead of structurally examining the log records. I speak from experience here.
assertThat(textSummaryMax)
.hasDescription("This is a test distribution summary")
.hasDoubleGaugeSatisfying(
gauge -> gauge.hasPointsSatisfying(
point -> point
.hasValue(500)
.hasAttributes(attributeEntry("tag", "value"))));
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo9E6ZTr3x7WG4nBQ_fo1%3DFcqewGJEiOxb5FXaPtuVEVDw%40mail.gmail.com.