Skip to content

Commit

Permalink
Merge branch 'dev' into dependabot/nuget/AWSSDK.EC2-3.7.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed Aug 13, 2021
2 parents f740327 + 32b850b commit dd9c288
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public async Task EmptyListIfNotPartOfCluster()
}

[Fact(DisplayName = "Http Bootstrap routes should include seed nodes when part of a cluster")]
public void IncludeSeedsWhenPartOfCluster()
public async Task IncludeSeedsWhenPartOfCluster()
{
var cluster = Akka.Cluster.Cluster.Get(Sys);
cluster.Join(cluster.SelfAddress);
Expand All @@ -63,18 +63,15 @@ public void IncludeSeedsWhenPartOfCluster()
var up = p.ExpectMsg<ClusterEvent.MemberUp>();
up.Member.Should().Be(cluster.SelfMember);

AwaitAssert(async () =>
{
var context = new DefaultHttpContext();
context.Request.Method = HttpMethods.Get;
context.Request.Path = ClusterBootstrapRequests.BootstrapSeedNodes("");
var context = new DefaultHttpContext();
context.Request.Method = HttpMethods.Get;
context.Request.Path = ClusterBootstrapRequests.BootstrapSeedNodes("");

var requestContext = new RequestContext(HttpRequest.Create(context.Request), Sys);
var response = (RouteResult.Complete) await _httpBootstrap.Routes.Concat()(requestContext);
var nodes = JsonConvert.DeserializeObject<SeedNodes>(response.Response.Entity.DataBytes.ToString());
nodes.Nodes.IsEmpty.Should().BeFalse();
nodes.Nodes.Select(n => n.Node).Should().Contain(cluster.SelfAddress);
});
var requestContext = new RequestContext(HttpRequest.Create(context.Request), Sys);
var response = (RouteResult.Complete) await _httpBootstrap.Routes.Concat()(requestContext);
var nodes = JsonConvert.DeserializeObject<SeedNodes>(response.Response.Entity.DataBytes.ToString());
nodes.Nodes.IsEmpty.Should().BeFalse();
nodes.Nodes.Select(n => n.Node).Should().Contain(cluster.SelfAddress);
}
}
}

0 comments on commit dd9c288

Please sign in to comment.