-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Flaky test issue 5424 #5439
Flaky test issue 5424 #5439
Conversation
app/models/case_contact_report.rb
Outdated
@@ -25,6 +25,7 @@ def filtered_case_contacts(args) | |||
.contact_type(args[:contact_type_ids]) | |||
.contact_type_groups(args[:contact_type_group_ids]) | |||
.with_casa_case(args[:casa_case_ids]) | |||
.order(:id) |
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.
Could you change the test instead of the app code?
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.
Sure no problem. Can I ask why it is preferable to go with Active Record's flaky ordering instead of explicit ordering? Happy to make the change, just pure curiosity.
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.
Generally you don't wanna change the app code to make a test run. You want to just change the test.
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.
Ah got it, thank you :)
e89aaba
to
29d8182
Compare
…on before equality comparison
29d8182
to
cffebc2
Compare
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.
I reverted the Gemfile.lock
commit, since it didn't have to do with the test.
I like this match_array
matcher. I had to do some reading on that. Nice work @hroulston!
What github issue is this PR for, if any?
Resolves #5424
What changed, and why?
In case_contact_report.rb file I ordered the Case Contacts by id under filtered_case_contacts method. Test passes since the order will match what is expected.
How will this affect user permissions?
How is this tested? (please write tests!) 💖💪
Test already in place, didn't need to change anything.
Screenshots please :)
Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:

Feedback please? (optional)
We are very interested in your feedback! Please give us some :) https://forms.gle/1D5ACNgTs2u9gSdh9