Home > Mobile >  Wanted: "Broken" TCP service for app timeout testing
Wanted: "Broken" TCP service for app timeout testing

Time:08-06

Some self-written java app is consuming external web services via SOAP requests (JAX-WS).

To minimize negative effects when communicating with those external services, I would like to make everything as fail-proof as possible when talking to missbehaving endpoints. While most of that can be handled pretty easily, there is one particular scenario, that turns out to be quite tricky: Timeout on a non-responsive endpoint.

(non-responsive = The endpoint builds up the TCP connection, but is not responding to any other requests)

To test this scenario, I require some simple TCP endpoint, which would mimic this behavior - accept TCP connections and stay quiet afterwards (thus, not terminating the connection!). As this endpoint does not require any particular protocol or service functionality, it can be possibly achieved with some standard tools, or even some few lines of code.

Any advise appreciated.

CodePudding user response:

Looks like this is just as simple as using NetCat with nc -l 4711 to open a port (4711). It will graciously accept any traffic sent, but does not respond with anything.

  • Related