-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add property based testing for FolderStorage #86
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool stuff, I like that
Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com>
After experimenting with various synchronization models for concurrent operations, the "StrongDelete" approach is coming out to be the most effective in terms of code complexity and efficiency with passing tests. The synchronization model can be stated as below -
|
* init Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * added tests Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * few fixes Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fmt Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * Add property based testing for FolderStorage (#86) * Add property test * Use print statements * experimental changes Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * Refactor to remove unwraps * Fix folderstorage model with strong deletes --------- Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> Co-authored-by: pushkarm029 <pushkarmishra029@gmail.com> * Fix formatting * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * remove bincode Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> * Change folderstorage file extension to json * fix Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> --------- Signed-off-by: pushkarm029 <pushkarmishra029@gmail.com> Co-authored-by: Ishan Bhanuka <bhanuka.ishan@gmail.com>
The test checks whether the following invariants holds -
Currently the test fails indicating some subtle bug in the implementation. Relaxing the properties or fixing the implementation are two possible ways to get the test passing. @Pushkarm029