test_ccc: use a pipe to synchronize testccc-tcp-v3
commit19f969d961c0ff6f6f45b4231d859605530d71ab
authorEric Wong <e@80x24.org>
Wed, 22 Mar 2017 22:59:34 +0000 (22 22:59 +0000)
committerEric Wong <e@80x24.org>
Wed, 22 Mar 2017 23:55:25 +0000 (22 23:55 +0000)
tree1691e1590a958ec1988df15042b376e76c946995
parent73769bc0bc309382689707595f57388ea5e5c737
test_ccc: use a pipe to synchronize test

Sleeping 1 second to test 100 requests is too long for some
systems; and not long enough for others.

We need to also finish reading the sleeper response to ensure
the server actually got the second request in, before sending
SIGQUIT to terminate it; as it's possible for the test client
to connect and abort 100 clients before the server even
increments the request counter for the 2nd request.
test/unit/test_ccc.rb