typelevel / scalacheck

Property-based testing for Scala
http://www.scalacheck.org
BSD 3-Clause "New" or "Revised" License
1.94k stars 407 forks source link

[Commands] Fix MatchError when using multiple workers #894

Closed yannkaiser-asana closed 2 years ago

yannkaiser-asana commented 2 years ago

Fixes #893

for (Some(v) <- Map(...).values) yield v would throw MatchError as soon as it tries to process a value that doesn't conform to Some(v).

The tests didn't detect this because property("...") = rhs was re-evaluating rhs each time the property is evaluated, which means that Commands.property() only ran one evaluation at a time (so suts would always be empty when we run those for comprehensions).

yannkaiser-asana commented 2 years ago

Ready to merge whenever, though it looks like you might need to manually trigger the tests for this PR.