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

Container ("Docker") launcher, based on Testcontainers #296

Open
vorburger opened this issue Sep 2, 2019 · 3 comments
Open

Container ("Docker") launcher, based on Testcontainers #296

vorburger opened this issue Sep 2, 2019 · 3 comments
Labels
helpwanted high Mac Anything specific only to Mac, not affecting Linux

Comments

@vorburger
Copy link
Collaborator

One could imagine that as an alternative to the current exec based approach of launching the external DB process, a container would be used (AKA "Docker", or Podman).

https://www.testcontainers.org/modules/databases/mariadb/ (and https://www.testcontainers.org/modules/databases/mysql/) do this, and I guess the API of this MariaDB4j project could be implemented based on top of that.

So there would be mariadb4j-api, mariadb4j-exec (as today) & mariadb4j-container (based on Testcontainers). May be using META-INF/services loader, with an automatic detection if Docker is available, or if the binaries are on the classath, to choose between either, if both artifacts are on the classpath? One could manually directly also use only either/or.

Not sure how much value this would really have... I mean, why wouldn't you just directly Testcontainers? Thoughts, anyone reading this?

I don't really have time to look into this in the short term, but may be someone else would like to explore this. Or may be I'll get to it some day.

@membersound
Copy link

If MariaDB4j could convert existing projects to docker-based Testcontainers, this would be a really nice feature. I recently switched to CI/CD gitlab pipelines, and started thinking if I should drop mariadb4j in favor of Testcontainers.

@vorburger
Copy link
Collaborator Author

main...issue-296_testcontainers.org starts to explore this. Status: I'm currently a bit blocked (or rather too lazy to locally re-build Podman...) due to docker-java/docker-java#2201; I may continue looking more into this later, once Podman >= 4.6.3 makes it to Fedora 38, which is currently on 4.6.2.

Re-working APIs etc. would be a bit of work; @membersound or anyone else reading this, please consider 💸 funding?

@vorburger vorburger added high helpwanted Mac Anything specific only to Mac, not affecting Linux labels Sep 16, 2023
@slangeberg
Copy link

Have found TestContainer was easy replacement for Mariadb4j in integration tests:

    //Previously MariaDB4J
    integrationTestImplementation "org.testcontainers:spock:${testContainersVersion}"
    integrationTestImplementation "org.testcontainers:mariadb:${testContainersVersion}"
    ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
helpwanted high Mac Anything specific only to Mac, not affecting Linux
Projects
None yet
Development

No branches or pull requests

3 participants