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

Model-based tests for PersistentShardCoordinator.State #5974

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented May 31, 2022

Fixes #5604

Changes

Added model-based test with FsCheck to validate that PersistentShardCoordinator.State is designed correctly.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

@Aaronontheweb
Copy link
Member Author

Tried this with a complex configuration and the tests passed after several minutes.

Ok, passed 10000 tests (100% long sequences (>6 commands)).

No issues with the State class, but I believe I found the error...

@Aaronontheweb Aaronontheweb changed the title [WIP] Model-based tests for PersistentShardCoordinator.State Model-based tests for PersistentShardCoordinator.State May 31, 2022
@Aaronontheweb
Copy link
Member Author

#5976 - must be merged first.

@@ -35,5 +35,13 @@ public static class FsharpDelegateHelper
value1 => { return Create<T2, T3, TResult>((value2, value3) => func(value1, value2, value3)); };
return FSharpFunc<T1, FSharpFunc<T2, FSharpFunc<T3, TResult>>>.FromConverter(conv);
}

public static FSharpFunc<T1, FSharpFunc<T2, FSharpFunc<T3, FSharpFunc<T4, TResult>>>> Create<T1, T2, T3, T4, TResult>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to support 4 argument FSharp functions

@Aaronontheweb Aaronontheweb marked this pull request as ready for review June 1, 2022 13:44
@Aaronontheweb
Copy link
Member Author

Failing tests are all unrelated.

@Aaronontheweb Aaronontheweb merged commit 8e8f6a3 into akkadotnet:v1.4 Jun 1, 2022
@Aaronontheweb Aaronontheweb deleted the fix-persistence-sharding-write-issues branch June 1, 2022 14:13
@Aaronontheweb
Copy link
Member Author

We should backport this to 1.5 but it's not urgent cc @Arkatufus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant