Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClusterStressSpec and Cluster Failure Detector Cleanup #4940

Merged
Prev Previous commit
Next Next commit
made MuteLog overrideable in Akka.Cluster.Testkit
  • Loading branch information
Aaronontheweb committed Apr 16, 2021
commit 71be0a2b470671097dd814ab6f4160e837b9c503
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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed this for changing MuteLog behavior in individual tests

{
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