Package org.apache.pekko.http.impl.util
Interface WithLogCapturing
- All Superinterfaces:
org.scalatest.SuiteMixin
- All Known Implementing Classes:
ClientCancellationSpec,ClientServerHttp2EnabledSpec,ClientServerSpec,ClientServerSpecBase,ClientTransportWithCustomResolverSpec,EntityDiscardingSpec,FramingSpec,GracefulTerminationSpec,HighLevelOutgoingConnectionSpec,HostConnectionPoolSpec,HttpEntitySpec,HttpExtensionApiSpec,HttpHeaderParserCRLFSpec,HttpHeaderParserLFSpec,HttpHeaderParserSpec,HttpServerBug21008Spec,HttpServerSpec,HttpServerWithExplicitSchedulerSpec,HttpsProxyGraphStageSpec,LowLevelOutgoingConnectionSpec,MessageSpec,MultipartSpec,NewConnectionPoolSpec,PekkoSpecWithMaterializer,RenderingSpec,ResponseParserCRLFSpec,ResponseParserLFSpec,ResponseParserSpec,TlsEndpointVerificationSpec,Utf8CodingSpecs,WebSocketClientSpec,WebSocketIntegrationSpec,WebSocketServerSpec
public interface WithLogCapturing
extends org.scalatest.SuiteMixin
Mixin this trait to a test to make log lines appear only when the test failed.
-
Method Summary
Modifier and TypeMethodDescriptionscala.Option<String>We expect a severe message but the message should contain this text.booleanCan be overridden to return true to check that no warning or error messages are logged during the execution of the testbooleanisSevere(org.apache.pekko.event.Logging.LogEvent event) Can be overridden to adapt which events should be considered as severe iffailOnSevereMessagesis enabled.org.apache.pekko.actor.ActorSystemsystem()org.scalatest.OutcomewithFixture(org.scalatest.TestSuite.NoArgTest test) <T> TwithPrefixedOut(String prefix, scala.Function0<T> thunk) Adds a prefix to every line printed out during execution of the thunk.Methods inherited from interface org.scalatest.SuiteMixin
expectedTestCount, nestedSuites, rerunner, run, runNestedSuites, runTest, runTests, styleName, suiteId, suiteName, tags, testDataFor, testNames
-
Method Details
-
expectSevereLogsOnlyToMatch
scala.Option<String> expectSevereLogsOnlyToMatch()We expect a severe message but the message should contain this text. If there are any other severe messages, the test will fail.- Returns:
- (undocumented)
-
failOnSevereMessages
boolean failOnSevereMessages()Can be overridden to return true to check that no warning or error messages are logged during the execution of the test- Returns:
- (undocumented)
-
isSevere
boolean isSevere(org.apache.pekko.event.Logging.LogEvent event) Can be overridden to adapt which events should be considered as severe iffailOnSevereMessagesis enabled.- Parameters:
event- (undocumented)- Returns:
- (undocumented)
-
system
org.apache.pekko.actor.ActorSystem system() -
withFixture
org.scalatest.Outcome withFixture(org.scalatest.TestSuite.NoArgTest test) -
withPrefixedOut
Adds a prefix to every line printed out during execution of the thunk.
-