Skip to content

Commit

Permalink
made MuteLog overrideable in Akka.Cluster.Testkit
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed Apr 7, 2021
1 parent eb40a29 commit 0fffc1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Akka.Cluster.TestKit/MultiNodeClusterSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected override void AfterTermination()

//TODO: ExpectedTestDuration?

void MuteLog(ActorSystem sys = null)
public virtual void MuteLog(ActorSystem sys = null)
{
if (sys == null) sys = Sys;
if (!sys.Log.IsDebugEnabled)
Expand Down
4 changes: 3 additions & 1 deletion src/core/Akka.Cluster.Tests.MultiNode/StressSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,10 @@ public class StressSpec : MultiNodeClusterSpec
public int Step = 0;
public int NbrUsedRoles = 0;

protected virtual void MuteLog(ActorSystem sys)
public override void MuteLog(ActorSystem sys = null)
{
sys ??= Sys;
base.MuteLog(sys);
Sys.EventStream.Publish(new Mute(new ErrorFilter(typeof(ApplicationException), new ContainsString("Simulated exception"))));
MuteDeadLetters(sys, typeof(AggregatedClusterResult), typeof(StatsResult), typeof(PhiResult), typeof(RetryTick));
}
Expand Down

0 comments on commit 0fffc1a

Please sign in to comment.