Skip to content

Commit

Permalink
add testkit log test on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetanova committed Dec 8, 2021
1 parent c5744a3 commit fcf18c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/Akka.TestKit/TestKitBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ protected void InitializeTest(ActorSystem system, ActorSystemSetup config, strin
new ActorCellKeepingSynchronizationContext(InternalCurrentActorCellKeeper.Current));

_testState.TestActor = testActor;

//HACK: await one log message
{
var msg = $"testprope-{Guid.NewGuid()}";
EventFilter.Warning(contains: msg).ExpectOne(TimeSpan.FromSeconds(3), () => system.Log.Warning(msg));
}
}

/// <summary>
Expand Down

0 comments on commit fcf18c2

Please sign in to comment.