testcontainers / testcontainers/testcontainers-java
MySQL: failure is reported as success
Open
Nobody has claimed this yet.
modules/jdbc
resolution/acknowledged
type/bug
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
The following code:
new MySQLContainer<>()
.withUsername("root")
fails with STDERR: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'root'@'%' but then:
18:38:14.158 INFO 🐳 [mysql:5.7.22] - Container is started (JDBC URL: jdbc:mysql://localhost:32775/test)
18:38:14.159 INFO 🐳 [mysql:5.7.22] - Container mysql:5.7.22 started
it may be caused by #1434, need investigation
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with MySQLContainer and withUsername("root"), then read the startup path and investigate the suspected connection to issue #1434. Confirm where the MySQL CREATE USER failure is handled and make the completed behavior report that failure instead of reporting a started container.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java, mysql
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100