]> Sergey Matveev's repositories - public-inbox.git/commit - t/lei-refresh-mail-sync.t
t/lei-refresh-mail-sync: speed up test on FreeBSD 12
authorEric Wong <e@80x24.org>
Tue, 2 Nov 2021 09:24:39 +0000 (09:24 +0000)
committerEric Wong <e@80x24.org>
Tue, 2 Nov 2021 11:13:46 +0000 (11:13 +0000)
commitf872a5e602a806c206019eaf0654abebba086f36
tree70d375d55935db5ba36bab9f9b09f3e741f60b83
parentbcc02b78e322f87d942459de874ba68b3fc06c39
t/lei-refresh-mail-sync: speed up test on FreeBSD 12

And improve reliability while we're at it.  It seems closing a
TCP listen socket on FreeBSD 12.2 doesn't cause connect()-ing
clients to fail.  This happens regardless of whether a socket is
IPv4 or IPv6

This non-failure was causing tests to timeout slowly on the
client side instead of failing immediately.  We now fork a new
process which does nothing but accept() + shutdown() to emulate
a dead server.

Reliability improves on all OSes since there's never a point in
time when another process can bind the socket.
t/lei-refresh-mail-sync.t