develooper Front page | | Postings from April 2015

Re: Communicating between processes in test suite run

Thread Previous | Thread Next
Cosimo Streppone
April 23, 2015 21:33
Re: Communicating between processes in test suite run
Message ID:
Il 23/04/2015 21:53, Tim Bunce ha scritto:

>>> How is "the port number is saved into the file" when you don't know
>>> which port it has bound itself to?
>> The daemon starts and binds using port 0. Still within the daemon code,
>> I can then query for the used port, through regular socket calls.
>> After that, I check for HARNESS_ACTIVE and STATSD_PORT_FILE
>> and I write the port to the file indicated by STATSD_PORT_FILE.
>> Of course I don't like that the statsd daemon code needs to know about
>> this at all.
> That approach only applies to your perl statsd, right?  For the nodejs
 > or C statsd's you don't have an easy[*] a way to find the port.

Correct. That would be an argument in favour of avoiding port zero,
and providing the daemon binary with a dynamic configuration,
so the port is chosen before-hand by the test "client".


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About