Skip to content

Commit

Permalink
Fixed Akka.Cluster.TestKit nuget package by removing reference to Akk…
Browse files Browse the repository at this point in the history
…a.Tests.Shared.Internals, which is not public. (#3139)

Replaced usages of "Should" extension assertions with ITestKitAssertions as to not require Akka.Tests.Shared.Internals.
  • Loading branch information
derrickcrowne authored and Aaronontheweb committed Oct 4, 2017
1 parent b81e6a6 commit 0ce05f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/core/Akka.Cluster.TestKit/Akka.Cluster.TestKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<ItemGroup>
<ProjectReference Include="..\Akka.Remote.TestKit\Akka.Remote.TestKit.csproj" />
<ProjectReference Include="..\Akka.Cluster\Akka.Cluster.csproj" />
<ProjectReference Include="..\Akka.Tests.Shared.Internals\Akka.Tests.Shared.Internals.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net452' ">
Expand Down
8 changes: 4 additions & 4 deletions src/core/Akka.Cluster.TestKit/MultiNodeClusterSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,14 @@ public void AwaitMembersUp(
AwaitAssert(() =>
{
foreach (var a in canNotBePartOfMemberRing)
ClusterView.Members.Select(m => m.Address).Contains(a).ShouldBeFalse();
_assertions.AssertFalse(ClusterView.Members.Select(m => m.Address).Contains(a));
});
AwaitAssert(() => ClusterView.Members.Count.ShouldBe(numbersOfMembers));
AwaitAssert(() => ClusterView.Members.All(m => m.Status == MemberStatus.Up).ShouldBeTrue("All members should be up"));
AwaitAssert(() => _assertions.AssertEqual(numbersOfMembers, ClusterView.Members.Count));
AwaitAssert(() => _assertions.AssertTrue(ClusterView.Members.All(m => m.Status == MemberStatus.Up), "All members should be up"));
// clusterView.leader is updated by LeaderChanged, await that to be updated also
var firstMember = ClusterView.Members.FirstOrDefault();
var expectedLeader = firstMember == null ? null : firstMember.Address;
AwaitAssert(() => ClusterView.Leader.ShouldBe(expectedLeader));
AwaitAssert(() => _assertions.AssertEqual(expectedLeader, ClusterView.Leader));
});
}

Expand Down

0 comments on commit 0ce05f0

Please sign in to comment.