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

Centralize :port and :shutdown-timeout settings in http-test #698

Closed DerGuteMoritz closed 7 months ago

DerGuteMoritz commented 7 months ago

Forgetting to pass :shutdown-timeout to a test server (as was the case in test-ssl-session-access for example) adds 15s extra wait time for each instance. This patch centralizes setting it to 0 so that one doesn't have to remember doing so.

Also centralize the :port setting so that tests which pass extra settings only have to declare the ones which are relevant to the test.

Drop redundant with-handler-options macro.

@KingMob This came up while working on https://github.com/clj-commons/aleph/issues/696 but I didn't want to lump it in there since it's a bit noisy.