Mercurial > hg > nginx-tests
changeset 1424:5bee71e1548f
Tests: adjusted stream udp test with failed peer.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 25 Dec 2018 13:56:51 +0300 |
parents | 29d0961bc3f7 |
children | 2f7d7953b2a8 |
files | stream_udp_upstream.t |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/stream_udp_upstream.t Tue Dec 25 13:56:49 2018 +0300 +++ b/stream_udp_upstream.t Tue Dec 25 13:56:51 2018 +0300 @@ -23,7 +23,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/stream udp/)->plan(4) +my $t = Test::Nginx->new()->has(qw/stream udp/)->plan(5) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -95,15 +95,16 @@ is(many(10, port(8980)), "$port4: 5, $port5: 5", 'balanced'); -# no next upstream for dgram - TODO: { local $TODO = 'not yet' unless $t->has_version('1.15.0'); -is(many(10, port(8981)), "$port4: 5, $port5: 4", 'failures'); +is(dgram('127.0.0.1:' . port(8981))->io('.', read_timeout => 0.5), '', + 'no next upstream for dgram'); } +is(many(10, port(8981)), "$port4: 5, $port5: 5", 'failures'); + is(many(9, port(8982)), "$port4: 3, $port5: 6", 'weight'); is(many(10, port(8983)), "$port4: 10", 'backup');