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

Replicate parallel executions in forallParallelCommands #43

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

jasagredo
Copy link

This is an implementation of #42. In general it can be seen as a revert of #12 and #11. This also makes #40 and #41 not necessary.

I would recommend isolating only a2f27d1 to view the relevant changes, the other commit just modifies the tests.

It is however important to note that in the tests I had a bunch of troubles with Cleanup because it tries to test the internals of QSM, by assuming multiple repetitions in place. I'm open to discussion on how to best do this. For now as that one was using 2 repetitions I'm running the parallel machine two times.

Copy link
Owner

@stevana stevana left a comment

Choose a reason for hiding this comment

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

Nice, I think this is heading in the right direction. The use of mask and restore worries me, I'd rather have it used bracket like we used to. I also suggested a bunch of other smaller clean ups.

src/Test/StateMachine/Parallel.hs Show resolved Hide resolved
src/Test/StateMachine/Parallel.hs Outdated Show resolved Hide resolved
test/ShrinkingProps.hs Outdated Show resolved Hide resolved
test/SQLite.hs Outdated Show resolved Hide resolved
test/Cleanup.hs Outdated Show resolved Hide resolved
test/Cleanup.hs Outdated Show resolved Hide resolved
test/Cleanup.hs Outdated Show resolved Hide resolved
src/Test/StateMachine/Parallel.hs Show resolved Hide resolved
src/Test/StateMachine/Sequential.hs Outdated Show resolved Hide resolved
src/Test/StateMachine/Parallel.hs Outdated Show resolved Hide resolved
@jasagredo
Copy link
Author

@stevana I addressed all your comments except the withTempDirectory one because it seems not-trivial currently.

@jasagredo
Copy link
Author

I think some of the tests that I marked as non-failing are again failing as they were before.

@jasagredo
Copy link
Author

Indeed, I changed 3-threads(Regular|Files) to not expectedFailure and now they are failing again. It seems something in the mask/restore approach was wrong compared with the bracketed version and now I restored the behavior of before these changes

Copy link
Owner

@stevana stevana left a comment

Choose a reason for hiding this comment

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

Nice work, I just noticed a few minor things, once fixed I think we can merge this!

src/Test/StateMachine/Sequential.hs Outdated Show resolved Hide resolved
test/Spec.hs Outdated Show resolved Hide resolved
test/SQLite.hs Show resolved Hide resolved
src/Test/StateMachine/Parallel.hs Show resolved Hide resolved
This commit reverts 4c186f4.

It also implements the change decribed in stevana#42, by which the repetition
of parallel executions happens at the `forallParallelCommands` level and
not in `runParallelCommands`.
@jasagredo jasagredo force-pushed the js/replicate-in-forall branch 2 times, most recently from daccfb5 to 7553d3e Compare March 31, 2024 11:01
test/Spec.hs Show resolved Hide resolved
test/SQLite.hs Show resolved Hide resolved
@stevana stevana self-requested a review April 2, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants