c7095c8450
This change fixes ephemeral port assignment for HTTP and SSH daemons. Current implementation is broken: it assigns a random port in GerritServer, closes the socket and effectively freeing it for the kernel to recycle to another thread, and store that port in gerrit.config file for reuse. Some time later in HTTP and SSH daemons the port number get read from the config file and the ports are bound. The problem is, that during this "think time" another test got the same port assigned and bind attempt is failing with: Caused by: java.net.BindException: Address already in use To rectify it, set port to 0 in gerrit.config for both HTTP and SSH daemons and let the daemons to do the ephemeral port assignments. In SSH and HTTP daemons this special case is recognized and the assigned ports are written back to gerrit.config to pass to the test harness side. Change-Id: Ib4971b200d6dc86268674398fe590137ae35b6f3 |
||
---|---|---|
.. | ||
src | ||
BUCK |