Lesson 125: testcontainers problem

Open Beginner friendly
#41 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java, mysql

Research direction

Start at MySqlTest line 28, or the later MySqlIT equivalent, and inspect how the MySQL container image is selected. Run the Lesson 125 integration test with the project’s container runtime; done means the MySQL container starts and the test connects successfully.

Written by the indexing model from the issue text.

Description

problem running the test, I found that the mysql container could not be connected to with the output showing errors, including "Connection refused: getsockopt"
mysql 9.3.0 was being pulled which seems to have a problem

mysql 9.1.0 in lecture currently

source: github testcontainers-java issue 10184
The solution was to specify mysql 8 rather than 9. Literally one character change in MySqlTest (later MySqlIT) line 28 :)
Better yet use "mysql:lts"

I was using podman (running on WSL2 in my case) rather than Docker

Dominant language
Java
Stars
57
Forks
605
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from springframeworkguru/spring-7-rest-mvc

All issues in springframeworkguru/spring-7-rest-mvc

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.