'Integration test for different instances of same application
I have a java application(no Spring). Replica of this application working at another server, with another instance of databse. Database table 'settings' have property master Y or N(for replica). After any action on master, i sending message to kafka an kafka sending action to replica with db update action. Any ideas for testing full cycle of this process?
I used testcontainers for getting kafka and databases. But i havent idea how to launch in testcontainer instance of my application with db.
Solution 1:[1]
What you need here is to containerize your java application. On each master action (merge), configure your CI/CD to create a docker image of your application. Then you can deploy your application using test containers.
GenericContainer container = new GenericContainer("myAppImage:release1")
.withImagePullPolicy(PullPolicy.defaultPolicy());
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Juan Rada |
