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

Fix ScriptUtils.runInitScript() in hierarchical classloader setup by using TCCL #5167

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

famod
Copy link
Contributor

@famod famod commented Mar 9, 2022

This fixes e.g. MariaDBContainer.withInitScript(...) in Quarkus continuous testing, which is using a hierarchical classloading setup.

Btw, for comparison, MountableFile (e.g. MariaDBContainer.withConfigurationOverride(...)) does work already:

classLoadersToSearch.add(Thread.currentThread().getContextClassLoader());

@famod
Copy link
Contributor Author

famod commented Mar 9, 2022

FYI @stuartwdouglas @geoand 🔝

@geoand
Copy link
Contributor

geoand commented Mar 9, 2022

👌

@famod
Copy link
Contributor Author

famod commented Apr 4, 2022

@rnorth @bsideup @kiview can you have a look please? Thanks!

@kiview
Copy link
Member

kiview commented Apr 4, 2022

@famod Thanks for the ping, we'll have a look at it 🙂

@kiview
Copy link
Member

kiview commented Apr 4, 2022

@famod Can you please explain how to reproduce the issue with Quarkus continuous testing, or share a reproducer?

@bsideup
Copy link
Member

bsideup commented Apr 4, 2022

I don't think we need Quarkus to test this, just a simple test should be added to the PR that ensures that the code takes context's classloader into the consideration 👍

@famod
Copy link
Contributor Author

famod commented Apr 5, 2022

I'll have a look. As I have a lot on my plate: Is there any ETA for the next TC release?

@kiview
Copy link
Member

kiview commented Apr 6, 2022

@famod We are currently in the process of preparing the next release. So having the test could help with getting this PR into the upcoming release.

@bsideup bsideup added this to the next milestone Apr 6, 2022
@kiview kiview merged commit 06fc95f into testcontainers:master Apr 6, 2022
@famod famod deleted the scriptutils-classloading branch April 6, 2022 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants