-
Notifications
You must be signed in to change notification settings - Fork 91
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
Make flaky tag work with Scalacheck suites #478
Conversation
Previously, the Scalacheck suite transform was registered after the `.flaky` transform so a flaky test would fail even if it was OK to ignore flaky failures. Reordering the transforms fixes the issue.
@@ -29,7 +29,7 @@ trait ScalaCheckSuite extends FunSuite { | |||
implicit def unitToProp(unit: Unit): Prop = Prop.passed | |||
|
|||
override def munitTestTransforms: List[TestTransform] = | |||
super.munitTestTransforms :+ scalaCheckPropTransform | |||
scalaCheckPropTransform +: super.munitTestTransforms |
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.
Feels like the discussions around transform registrations paid off big time. I was a big proponent for side-effecting transforms but that would have been a nightmare to debug for this bug here.
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.
LGTM🙏
Mm the CI failure looks legit |
There was a bug in the JS/Native implementation of `RunNotifier` so that it would report that a test was both ignored and that it succeeded.
The test failure was a legitimate bug, which only got surfaced now because of the change. The problem was that the JS/Native test reporter reported that ignored tests also succeeded. |
Previously, the Scalacheck suite transform was registered after the
.flaky
transform so a flaky test would fail even if it was OK toignore flaky failures. Reordering the transforms fixes the issue.