citrusframework / citrusframework/citrus

Remote server: Start up endpoint ports when server starts

Open
#449 1 comment 0 reactions 0 assignees View on GitHub
enhancement prio-medium to-discuss
Dominant language
Java
Stars
485
Forks
155
Avg merge
4d 22h
Merged PRs (30d)
6

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.