He-Pin commented on code in PR #394:
URL: 
https://github.com/apache/incubator-pekko-http/pull/394#discussion_r1458903816


##########
http-core/src/test/scala/org/apache/pekko/http/impl/util/WithLogCapturing.scala:
##########
@@ -86,6 +92,19 @@ trait WithLogCapturing extends SuiteMixin { this: TestSuite 
=>
       Failed(new AssertionError(
         s"No severe log messages should be emitted during test run but got 
[${stats(
             Logging.WarningLevel)}] warnings and 
[${stats(Logging.ErrorLevel)}] errors (see marked lines above)"))
+    } else if (expectSevereLogsOnlyToMatch.nonEmpty) {
+      val severeEvents = events.filter(isSevere(_))
+      val matchingEvents = 
severeEvents.filter(_.message.toString.contains(expectSevereLogsOnlyToMatch.get))
+      if (severeEvents.isEmpty || matchingEvents != severeEvents) {
+        val stats = 
events.groupBy(_.level).mapValues(_.size).toMap.withDefaultValue(0)

Review Comment:
   IIRC, there is a `groupMap`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to