testcontainers / testcontainers/testcontainers-java
ContainerDatabaseDriver could use its own ClassLoader
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 1.9k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 9
Description
Basic ServiceLoader#load() signature uses Thread#currentThread()#getContextClassLoader(), which doesn't account for situations where ContainerDatabaseDriver has been provided in a modular fashion. It seems reasonable to require that the various JdbcDatabaseContainerProvider implementations live in the same ClassLoader as the driver class itself.
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
Locate ContainerDatabaseDriver and inspect its ServiceLoader#load() call, along with the JdbcDatabaseContainerProvider loading path. Check how the driver class loader and the thread context class loader differ in modular setups. Done means providers are loaded from the driver’s class loader and regression coverage verifies that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100