holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.03k stars 84 forks source link

unflake one server, two clients test #169

Closed HDegroote closed 6 months ago

HDegroote commented 6 months ago

The 'one server, two clients - first connection' test was flaky (very rarely though).

The original test had pretty strange behaviour, destroying the connections immediately on opening, and only expecting one connection for swarm1.

I think that the behaviour it was trying to test was that when there is 1 server and 2 clients, the clients connect to the server but not to each other, so I rewrote the test to be much more explicit about that. Good to double check that that is indeed the intention though.

HDegroote commented 6 months ago

See also this PR https://github.com/holepunchto/hyperswarm/pull/150 which also observed that the server should receive 2 connections. That PR can also be closed when this one is merged