Skip to content

Use redis in CI to prevent conflicting/reserved capybara ports#12705

Merged
alecslupu merged 1 commit intodecidim:developfrom
mainio:chore/parallel-test-capybara-reserved-ports
May 3, 2024
Merged

Use redis in CI to prevent conflicting/reserved capybara ports#12705
alecslupu merged 1 commit intodecidim:developfrom
mainio:chore/parallel-test-capybara-reserved-ports

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

🎩 What? Why?

Capybara server sometimes fails to start due to a reserved port.

This is because the Rails server takes a while to start and when the Capybara setup is checking whether the port is reserved, it fails to do so because the server did not yet have enough time to start.

This PR adds the Redis service to the test_app pipeline to utilize a central database for all specs to store which ports are reserved.

📌 Related Issues

Testing

  • Run the specs normally without having Redis running in the background -> expect the specs to work
  • Run the specs with Redis running in the background -> expect the specs to work
  • Run the specs using parallel_test with Redis running in the background -> expect less issues with reserved ports

If you run parallel_test without Redis, expect to see the same issue as so far occasionally.

@ahukkanen ahukkanen added the type: internal PRs that aren't necessary to add to the CHANGELOG for implementers label Apr 17, 2024
@alecslupu alecslupu self-assigned this Apr 17, 2024
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

I have tried to replicate on my Local, but no success. Reading the code, i could not find anything wrong with the logic.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: internal PRs that aren't necessary to add to the CHANGELOG for implementers

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants