Remote server: Start up endpoint ports when server starts
User story As a software developer, I want the citrus remote server to start up endpoint ports with the server, so that a cloud deployment platform like OpenShift will detect the ports availability early.
In a scenario we mocked a HTTP REST server under port 9080 via Citrus. Citrus itself was deployed as a remote server inside an OpenShift container. For the SUT to reach the server it needs to be made available via a "route", which is an OpenShift artifact for making HTTP services available to the "outside".
However, Citrus only starts up that port while the test is running, not when the remote server starts up, and shuts it down directly afterwards. The OpenShift route instead, like many similar cloud framework artifacts, is designed to serve long running port services, which come up with the container serving them and stay available. It waits for the availability of that port in disabled state. Once the port gets ready it also takes it some time to actually detect that situation and become ready.
This small delay made tests fail by chance. At the start of the test Citrus fires up the server mock instantly, the SUT calls the mock via route but the route might not yet be ready, so the test fails.
Most cloud platforms have ways to wait for a port to become available before it labels a service as "ready". If Citrus remote server would fire up endpoint ports early on startup and keeps them open for its runtime, the platform could wait for that, and continue only once the service is sure gets ready.
Hi!
Now, when I read the requirement, that sounds like a use case for the citrus-simulator. There you've the Endpoints available instantly. But yes, let me think about it a little more to come up with a concept.
BR, Sven