This test checks that we should not be able to connect to server
listening on IPv4 via IPv6 and vice versa.
However by chance some other test might start listening on the same
port as this test is using, just using different protocol. In this
case the test will fail.
To make this test more robust we add a check which verifies that
server did not actually see the connection from the client with a
matching port (we compare client's port to remotePort that server saw).
After these changes we only should fail this test if we indeed managed
to connect to the loopback server using a mismatching protocol.
Fixes https://github.com/dart-lang/sdk/issues/30700
Change-Id: Ib4f3d0346030dcffaac44ff5dd4050939984b1fc
Reviewed-on: https://dart-review.googlesource.com/c/85389
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>