Skip to content

Commit

Permalink
harden RestartFirstSeedNodeSpec (#4954)
Browse files Browse the repository at this point in the history
* harden RestartFirstSeedNodeSpec

* validate that we have complete seed node list prior to test
  • Loading branch information
Aaronontheweb authored Apr 19, 2021
1 parent 1f81842 commit 2de428b
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit 2de428b

Please sign in to comment.