[squeak-dev] Re: Port numbers in network tests

Frank Shearar frank.shearar at gmail.com
Thu Apr 4 17:43:38 UTC 2013


On 4 April 2013 18:32, Colin Putney <colin at wiresong.com> wrote:
>
>
>
> On Thu, Apr 4, 2013 at 10:18 AM, Frank Shearar <frank.shearar at gmail.com>
> wrote:
>
>>
>> OK, so it's not a crazy implementation? It's been a long time since I
>> worked with sockets, and pretty much the first time I've worked with
>> sockets in Squeak.
>
>
> I think that in practice, I'd just pick a random port (1025 to 65535) and
> answer that. Between the 2^15 possible ports and the short time that each
> test occupies a port, chances of collision are low, and if one does occur,
> well, it's not a catastrophe.

Hm, I guess...

> Your "crazy" implementation might end up causing *more* failures, because
> the OS sometimes takes a short while to clean up after a socket is closed,
> and attempts to listen on the same port will fail until the clean up is
> done.

OK. I haven't looked at the Xtreams socket test setUp yet, but I'm
betting it's also simply a hardcoded value. At any rate, I'll submit a
fix for WebClient soon.

frank

> Colin
>
>
>


More information about the Squeak-dev mailing list