clj-commons / aleph

Asynchronous streaming communication for Clojure - web server, web client, and raw TCP/UDP
http://aleph.io
MIT License
2.54k stars 241 forks source link

Randomize port for TCP tests #661

Closed arnaudgeiser closed 1 year ago

arnaudgeiser commented 1 year ago

Description

This ensures port are randomized for udp and tcp servers. It helps to stabilize the tests when some servers take a little bit of time to be shutdown.

arnaudgeiser commented 1 year ago

Yes, definitely, it will work for the server. But we need to be aware of the port used so it can be exercised by the client on the tests. Do you have a proposition here?

KingMob commented 1 year ago

The object returned from start-server implements the AlephServer protocol, which has a method port, which returns the port number.

arnaudgeiser commented 1 year ago

The object returned from start-server implements the AlephServer protocol, which has a method port, which returns the port number.

Right, great for TCP servers! Since those were the only ones concerned with instability, I decided to fix only them.