Skip to content

Fix MySQL startup in Testcontainers #357

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 2 commits into from
Jan 14, 2023

Conversation

KarboniteKream
Copy link
Contributor

@KarboniteKream KarboniteKream commented Jan 14, 2023

Description

This PR fixes the MySQLContainer configuration to have the container successfully start. Testcontainers uses the credentials provided using withUsername() and withPassword() to connect to the container and confirm it has started. With the current implementation of configure(), the state is never correctly set and Testcontainers cannot connect.

Detailed changes

  • Move some environment variables out of configure() so Testcontainers is correctly configured
  • Bump testcontainers to latest version, to make it work on M1 Macs (fixes JNA dependency and adds support for amd64 images). Closes build(deps): bump testcontainers to 1.17.5 #324.
  • Update .gitignore to ignore more test logs

Notes

The unix socket exposed in #319 does not work correctly under Docker for Mac with VirtioFS enabled, and also prevents container startup due to permission issues. Switching to gRPC FUSE or osxfs is a temporary workaround until it's fixed on Docker side.

@KarboniteKream KarboniteKream changed the title Fix MySQL start up in Testcontainers Fix MySQL startup in Testcontainers Jan 14, 2023
@oshai oshai merged commit 2fdfaab into jasync-sql:master Jan 14, 2023
@oshai
Copy link
Contributor

oshai commented Jan 14, 2023

Thanks for the PR!

@KarboniteKream KarboniteKream deleted the fix/docker-mac branch January 14, 2023 23:00
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