Skip to content
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

[WIP] Tests in random order #2266

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

[WIP] Tests in random order #2266

wants to merge 2 commits into from

Conversation

onk
Copy link
Collaborator

@onk onk commented Apr 13, 2024

Randomize test order is a best practice for writing good tests.

onk added 2 commits April 14, 2024 01:18
Randomize test order is a best practice for writing good tests.
Copy link

@github-actions github-actions bot added the reviewapps Build ReviewApp environment automatically if this label is granted label Apr 13, 2024
@onk
Copy link
Collaborator Author

onk commented Apr 13, 2024

I got lucky pulling a failing seed on the first try.

AUTO INCREMENT causes a problem when some factories set IDs and others do not.
They end up with the duplicate primary key.

  1. :proposal_item_configs_expected_participant # id { 1 } is specified
  2. :proposal_item_configs_presentation_method # id => 2 (auto increment)
  3. :proposal_item_configs_assumed_visitor # id => 3 (auto increment)
  4. :proposal_item_configs_session_time, :all_ok # id { 3 } is specified 💥

@onk onk changed the title Tests in random order [WIP] Tests in random order Apr 13, 2024
@ShotaKitazawa ShotaKitazawa removed the reviewapps Build ReviewApp environment automatically if this label is granted label May 5, 2024
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.

2 participants