Issue
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
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());
Answered By - Juan Rada
Answer Checked By - Mary Flores (JavaFixing Volunteer)