Skip to content

chore: improve slow tests #2258

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

davidmillen50
Copy link
Contributor

@davidmillen50 davidmillen50 commented Aug 7, 2025

The below tests are slow due to the feedback test data creation. I reduced the amount of feedback created to reduce to slowness. In test planner/spec/features/admin/feedback_spec.rb:11 10 pieces of feedback are generated with Fabricate. To me 10 seems excessive so I have reduced this to 2 to speed the test up. In the other test 3 pieces of feedback and 3 pieces of other_feedback were being created and I have reduced this to 1 in each (total of 2).

The slow tests:
planner/spec/features/admin/feedback_spec.rb:11
'can access the feedback page'
locally the test run time went from 27.41s to 6.45s

planner/spec/features/admin/chapter/feedback_spec.rb:4
'is only available to chapter organisers'
locally the test run time went from 25.19s to 13.27s

@mroderick
Copy link
Contributor

Thank you for this quality of life PR!

Copy link
Contributor

@KimberleyCook KimberleyCook left a comment

Choose a reason for hiding this comment

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

🎉

@olleolleolle olleolleolle merged commit 3a034a4 into codebar:master Aug 12, 2025
2 checks passed
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.

4 participants