Mercurial > hg > nginx-tests
comparison 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 |
comparison
equal
deleted
inserted
replaced
991:6246d69857cc | 992:1beb641e21c9 |
---|---|
90 | 90 |
91 $t->waitforfile($t->testdir . '/' . port(8080)); | 91 $t->waitforfile($t->testdir . '/' . port(8080)); |
92 | 92 |
93 ############################################################################### | 93 ############################################################################### |
94 | 94 |
95 ok(stream('127.0.0.1:' . port(8081))->io('.'), 'resolver'); | 95 ok(stream('127.0.0.1:' . port(8081))->read(), 'resolver'); |
96 ok(!stream('127.0.0.1:' . port(8082))->io('.'), 'upstream no port'); | 96 ok(!stream('127.0.0.1:' . port(8082))->read(), 'upstream no port'); |
97 ok(!stream('127.0.0.1:' . port(8083))->io('.'), 'name not found'); | 97 ok(!stream('127.0.0.1:' . port(8083))->read(), 'name not found'); |
98 | 98 |
99 ok(stream('127.0.0.1:' . port(8084))->io('.'), 'resolved tries'); | 99 ok(stream('127.0.0.1:' . port(8084))->read(), 'resolved tries'); |
100 ok(!stream('127.0.0.1:' . port(8085))->io('.'), 'resolved tries limited'); | 100 ok(!stream('127.0.0.1:' . port(8085))->read(), 'resolved tries limited'); |
101 ok(stream('127.0.0.1:' . port(8086))->io('.'), 'resolved tries zero'); | 101 ok(stream('127.0.0.1:' . port(8086))->read(), 'resolved tries zero'); |
102 | 102 |
103 $t->stop(); | 103 $t->stop(); |
104 | 104 |
105 SKIP: { | 105 SKIP: { |
106 skip "relies on error log contents", 2 unless $ENV{TEST_NGINX_UNSAFE}; | 106 skip "relies on error log contents", 2 unless $ENV{TEST_NGINX_UNSAFE}; |