test_server: test_early_hints: fix test reliability
commit3137c81b3653f2348bbcedb97aae937ba9469299
authorEric Wong <bofh@yhbt.net>
Thu, 23 Jul 2020 04:17:34 +0000 (23 04:17 +0000)
committerEric Wong <bofh@yhbt.net>
Fri, 24 Jul 2020 06:03:51 +0000 (24 06:03 +0000)
tree01bba39bb8891ccadf403f3d092d46c932e4cce0
parent92f587c191c96e201984d47ccdaf43a1bff2fc17
test_server: test_early_hints: fix test reliability

IO#sysread may only capture the 103 response and return before
the server can send the 200.  Since we don't support persistent
connections, we can just use IO#read to rely on the server
giving us an EOF after the 200 is sent.

Cc: Jean Boussier <jean.boussier@gmail.com>
test/unit/test_server.rb