Skip to content

Commit d716471

Browse files
Fix race condition in EventFilterTestBase logger initialization (#673)
Increased timeout for logger initialization from 3 seconds to 10 seconds to prevent intermittent test failures in CI environments under load. The ForwardAllEventsTestEventListener sometimes takes longer than 3 seconds to initialize and respond with an "OK" signal, causing random test failures with timeout errors. This fix gives the logger more time to initialize while also converting to async API for better async/await pattern consistency. Fixes test failures in: - ExceptionEventFilterTests.ShouldReportCorrectMessageCount - CustomEventFilterErrorTests.Messages_can_be_muted_from_now_on
1 parent d33bc9b commit d716471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Akka.Hosting.TestKit.Tests/TestEventListenerTests/EventFilterTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected override async Task BeforeTestStart()
4949
SendRawLogEventMessage(initLoggerMessage);
5050
try
5151
{
52-
ExpectMsg("OK");
52+
await ExpectMsgAsync("OK", TimeSpan.FromSeconds(10));
5353
}
5454
catch (Exception e)
5555
{

0 commit comments

Comments
 (0)