-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
[BUG]: Flaky test in children_served_report_service_spec.rb #4297
Comments
I was pondering this, and I'm wondering if what we should do is have the generic Item base off of a 'neutral' base item -- one that doesn't fit in to any of the categories for now. Then it's not going to get counted in on any of the scopes, or in with the diapers or period supplies or adult incontinence for the kits. |
I'd rather fix this with our bigger push to stop relying on seeded / randomized data for our tests. In this case, if we care what the type of item is, we need to specify it when we create it. |
Changes the test to explicitly create all the items needed. This removes flakiness surrounding potential situations where generated items get counted as disposable.
Changes the test to explicitly create all the items needed. This removes flakiness surrounding potential situations where generated items get counted as disposable.
Changes the test to explicitly create all the items needed. This removes flakiness surrounding potential situations where generated items get counted as disposable.
See #4273 (comment) for full discussion.
rspec ./spec/services/reports/children_served_report_service_spec.rb[1:2:1] --seed 56095
fails on main.rspec ./spec/services/reports/children_served_report_service_spec.rb --seed 11104
passes.The test is flaky, it is likely related to the items that are getting created when new kits are created by factory bot in the test. Most likely some of the
BaseItem
are getting counted as disposables since they sometimes have "Diaper" in their names. We can also tell that the seeded items are the issue since destroying all the items at the start of the test fixes the issue.To fix this you will need to change
to ensure that those items do not have diaper in their names (i think 🙂 ).
The text was updated successfully, but these errors were encountered: