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

harden RestartFirstSeedNodeSpec #4954

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class RestartFirstSeedNodeSpec : MultiNodeClusterSpec
{
private readonly RestartFirstSeedNodeSpecConfig _config;
private Address _missedSeed;
private static Address _seedNode1Address;
private static volatile Address _seedNode1Address;

private Lazy<ActorSystem> seed1System;
private Lazy<ActorSystem> restartedSeed1System;
Expand Down Expand Up @@ -104,7 +104,9 @@ public void Cluster_seed_nodes__must_be_able_to_restart_first_seed_node_and_join
// now we can join seed1System, seed2, seed3 together
RunOn(() =>
{
Cluster.Get(seed1System.Value).JoinSeedNodes(GetSeedNodes());
var seeds = GetSeedNodes();
seeds.Count.Should().Be(4); // validate that we have complete seed node list
Cluster.Get(seed1System.Value).JoinSeedNodes(seeds);
AwaitAssert(() =>
{
Cluster.Get(seed1System.Value)
Expand All @@ -122,7 +124,9 @@ public void Cluster_seed_nodes__must_be_able_to_restart_first_seed_node_and_join
}, _config.Seed1);
RunOn(() =>
{
Cluster.JoinSeedNodes(GetSeedNodes());
var seeds = GetSeedNodes();
seeds.Count.Should().Be(4); // validate that we have complete seed node list
Cluster.JoinSeedNodes(seeds);
AwaitMembersUp(3);
}, _config.Seed2, _config.Seed3);
EnterBarrier("started");
Expand Down