question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

etcd launcher, by exec-ing instead of Testcontainers

See original GitHub issue

It can be useful for projects using this jetcd project to be able to start etcd server in their respective tests. And not just for tests, but possibly also to simplify at least development (but probably never production) set ups - think “embedded database” (à la Derby, h2, MariaDB4j & Co.).

The tests in this project use Testcontainers. Projects using jetcd could also use Testcontainers for above. For simple Windows users, or even Linux noobs without Docker installed, this could sometimes be a PITA.

An alternative is to just start jetcd via exec. I’m doing this over in my EtcdLauncher. (That as-is currently just assumes that one has done e.g. sudo dnf install etcd … it’s also imaginable to make native binaries available as dependencies, such as how e.g. MariaDB4j and similar projects for other databases do it.)

Would a contribution with such a Launcher, or perhaps even some work for a simple etcd launch API which can start it either via Testcontainers or via exec, be of interest to this project?

If so, would using (and having a dependency from a jetcd:launcher artifact to) https://github.com/vorburger/ch.vorburger.exec for such a feature be acceptable, or do you have any preference for another similar launcher utility?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lburgazzolicommented, Aug 20, 2018

we were using a similar strategy in the past but it was not the best solution so I’d really like ti keep testcontainers for integration test and have a better mock framework for unit tests.

But an ‘exec’ server could be useful so if you have time to contribute it, just send a pr and we’ll review it 😃

On Mon, 20 Aug 2018 at 19:36, Michael Vorburger ⛑️ notifications@github.com wrote:

It can be useful for projects using this jetcd project to be able to start etcd server in their respective tests. And not just for tests, but possibly also to simplify at least development (but probably never production) set ups - think “embedded database” (à la Derby, h2, MariaDB4j https://github.com/vorburger/MariaDB4j/ & Co.).

The tests in this project use Testcontainers https://www.testcontainers.org. Projects using jetcd could also use Testcontainers for above. For simple Windows users, or even Linux noobs without Docker installed, this could sometimes be a PITA.

An alternative is to just start jetcd via exec. I’m doing this over in my EtcdLauncher https://github.com/vorburger/opendaylight-etcd/blob/e2eb2dac17b399e142128c0d96971bc80995e14f/launcher/src/main/java/org/opendaylight/etcd/launcher/EtcdLauncher.java. (That as-is currently just assumes that one has done e.g. sudo dnf install etcd … it’s also imaginable to make native binaries available as dependencies, such as how e.g. MariaDB4j https://github.com/vorburger/MariaDB4j/ and similar projects for other databases do it.)

Would a contribution with such a Launcher, or perhaps even some work for a simple etcd launch API which can start it either via Testcontainers or via exec, be of interest to this project?

If so, would using (and having a dependency from a jetcd:launcher artifact to) https://github.com/vorburger/ch.vorburger.exec for such a feature be acceptable, or do you have any preference for another similar launcher utility?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/etcd-io/jetcd/issues/361, or mute the thread https://github.com/notifications/unsubscribe-auth/AByEhQwowZ03lsiLaP29g8o74f8Vvaljks5uSvOzgaJpZM4WEa5d .

Luca Burgazzoli

0reactions
bsideupcommented, Apr 8, 2019

I’m sorry, but the PITA here is Docker and Docker’s distribution, also Docker Compose (and we do not recommend using it, there are many more things on Docker Compose which really suck compared to generic containers, e.g. this: https://github.com/docker/compose/issues/6636 ) 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Executing commands - Testcontainers for Java
Executing commands. Container startup command. By default the container will execute whatever command is specified in the image's Dockerfile.
Read more >
Testcontainers for Java
Testcontainers for Java is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, ...
Read more >
Database containers - Testcontainers for Java
Database containers. Overview. You might want to use Testcontainers' database support: Instead of H2 database for DAO unit tests that depend on database ......
Read more >
Quick Guide to Microservices with Kubernetes, Spring Boot 2 ...
This article shows how to build microservices architecture and run it on Kubernetes using Spring Boot framework features.
Read more >
Spring Batch :: Red Hat Integration - Red Hat Customer Portal
Explicitly defines if the jobName should be taken from the headers instead of the URI. false. boolean. jobLauncher (producer).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found