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

ci: fix postgres flaky tests #1574

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

ndr-brt
Copy link
Contributor

@ndr-brt ndr-brt commented Sep 23, 2024

WHAT

inject a port for postgresql container generated by the getFreePort method instead of the random one generated by Testcontainers.

WHY

The order in which components are generated is:

  • configuration for the runtime (with ports generated by getFreePort method)
  • postgres instance is generated
  • postgres instance is started on a random port
  • the connector runtime is started

so if postgres runs on a port that was already be used for the runtime configuration, the runtime then cannot be started because of port conflict.

generating the postgres port with getFreePort should fix the issue

FURTHER NOTES

  • removed unused service in the workflow

Closes #1027

Copy link

sonarcloud bot commented Sep 23, 2024

@ndr-brt ndr-brt marked this pull request as ready for review September 23, 2024 08:01
@ndr-brt ndr-brt merged commit aa53845 into eclipse-tractusx:main Sep 23, 2024
33 checks passed
@ndr-brt ndr-brt deleted the solve-pg-flaky branch September 23, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Flaky postgresql test
3 participants