Mercurial > hg > nginx-tests
diff stream_resolver.t @ 992:1beb641e21c9
Tests: fixed tests on win32 with stream return module.
Avoid sending client data that stream return module doesn't read.
This has a bad interaction on win32 where client may get a socket
read error after it wrote data to the already closed socket.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 22 Jul 2016 16:50:17 +0300 |
parents | 64505109060c |
children | e4974af3fb12 |
line wrap: on
line diff
--- a/stream_resolver.t +++ b/stream_resolver.t @@ -92,13 +92,13 @@ EOF ############################################################################### -ok(stream('127.0.0.1:' . port(8081))->io('.'), 'resolver'); -ok(!stream('127.0.0.1:' . port(8082))->io('.'), 'upstream no port'); -ok(!stream('127.0.0.1:' . port(8083))->io('.'), 'name not found'); +ok(stream('127.0.0.1:' . port(8081))->read(), 'resolver'); +ok(!stream('127.0.0.1:' . port(8082))->read(), 'upstream no port'); +ok(!stream('127.0.0.1:' . port(8083))->read(), 'name not found'); -ok(stream('127.0.0.1:' . port(8084))->io('.'), 'resolved tries'); -ok(!stream('127.0.0.1:' . port(8085))->io('.'), 'resolved tries limited'); -ok(stream('127.0.0.1:' . port(8086))->io('.'), 'resolved tries zero'); +ok(stream('127.0.0.1:' . port(8084))->read(), 'resolved tries'); +ok(!stream('127.0.0.1:' . port(8085))->read(), 'resolved tries limited'); +ok(stream('127.0.0.1:' . port(8086))->read(), 'resolved tries zero'); $t->stop();