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

restored Akka.Cluster model-based FsCheck specs #4949

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/core/Akka.Cluster.Tests/Akka.Cluster.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
<PackageReference Include="FsCheck.Xunit" Version="$(FsCheckVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Fsharp.Core" Version="5.0.1" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetFrameworkTestVersion)' ">
Expand Down
2 changes: 0 additions & 2 deletions src/core/Akka.Cluster.Tests/ClusterGenerators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// </copyright>
//-----------------------------------------------------------------------

#if FSCHECK
using System;
using System.Linq;
using System.Net;
Expand Down Expand Up @@ -54,4 +53,3 @@ public static Arbitrary<MemberStatus> MemberStatusGenerator()
}
}
}
#endif
11 changes: 4 additions & 7 deletions src/core/Akka.Cluster.Tests/MemberOrderingModelBasedTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
// </copyright>
//-----------------------------------------------------------------------

#if FSCHECK
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Tests.Shared.Internals.Helpers;
using Akka.Util;
using Akka.Util.Internal;
using FsCheck;
using FsCheck.Experimental;
Expand Down Expand Up @@ -90,7 +88,7 @@ public MembershipSetup(UniqueAddress[] addresses)
// filter out any duplicates
_members =
addresses.Distinct()
.Select(x => new Member(x, int.MaxValue, MemberStatus.Up, ImmutableHashSet<string>.Empty))
.Select(x => new Member(x, int.MaxValue, MemberStatus.Up, ImmutableHashSet<string>.Empty, AppVersion.Zero))
.ToArray();
}

Expand Down Expand Up @@ -199,7 +197,7 @@ public override Property Check(MembershipState actual, MembershipModel model)
{
var members = actual.Members;
actual.Members = members.Add(new Member(_address, int.MaxValue, MemberStatus.Up,
ImmutableHashSet<string>.Empty));
ImmutableHashSet<string>.Empty, AppVersion.Zero));

var except = actual.Members.SymmetricExcept(model.AllMembers.Values);

Expand All @@ -212,7 +210,7 @@ public override MembershipModel Run(MembershipModel model)
{
return
model.UpdateMember(new Member(_address, int.MaxValue, MemberStatus.Up,
ImmutableHashSet<string>.Empty));
ImmutableHashSet<string>.Empty, AppVersion.Zero));
}

public override string ToString()
Expand Down Expand Up @@ -249,4 +247,3 @@ public MembershipModel UpdateMember(Member m)
}
}
}
#endif
2 changes: 1 addition & 1 deletion src/core/Akka.FSharp.Tests/Akka.FSharp.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<ProjectReference Include="..\Akka.FSharp\Akka.FSharp.fsproj" />
<ProjectReference Include="..\Akka.TestKit\Akka.TestKit.csproj" />
<ProjectReference Include="..\Akka.Remote\Akka.Remote.csproj" />
<ProjectReference Include="..\Akka.Tests.Shared.Internals\Akka.Tests.Shared.Internals.csproj" />

</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<ItemGroup>
<PackageReference Include="FsCheck.Xunit" Version="$(FsCheckVersion)" />
<PackageReference Include="Fsharp.Core" Version="5.0.1" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == '$(NetStandardLibVersion)' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// </copyright>
//-----------------------------------------------------------------------

#if FSCHECK
using System;
using Microsoft.FSharp.Core;

Expand Down Expand Up @@ -38,4 +37,3 @@ public static FSharpFunc<T1, FSharpFunc<T2, FSharpFunc<T3, TResult>>> Create<T1,
}
}
}
#endif