Hello I am using Spring Boot to create an integration test. I have a mediator class and a test class where I have two separate spring boot applications running on local host but on two different ports.
They each have their own application.properties (app.properties and test.properties and they are respectively in src/main and src/test). My mediator class is connected to a northbound SOAP endpoint. I want to test these soap calls using an integration test class. I want it to launch on my test server but also launch my mediator server.
I want to do this in my pre-integration in my pom.xml
Currently I have this
How do I specify to start the two different servers on two different ports?
I know I can do this in my Spring test class by getting the property source and telling which classes to run although I do not know if Spring can handle that annotation(specifying two property sources and running SpringBootTest with two apps). I have a feeling that it will most likely break.
I also want to avoid things like making a shell script. I want to do this in Maven.
I have tried setting the ports in server.properties to a custom name and setting them as arguments to connect but it's not pointing to any of my classes and not running both servers.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop