Mercurial > hg > nginx-tests
comparison stream_udp_limit_rate.t @ 1433:3e0dcf1e7752
Tests: keep stream_udp_limit_rate.t TODOs for a while.
It's useful to have tests pass on the latest (unfixed) version available.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 22 Jan 2019 14:37:04 +0300 |
parents | d17fb72140f2 |
children | 760fdf2865bb |
comparison
equal
deleted
inserted
replaced
1432:d17fb72140f2 | 1433:3e0dcf1e7752 |
---|---|
72 is($s->io($str), $str, 'unlimited'); | 72 is($s->io($str), $str, 'unlimited'); |
73 is($s->io($str), $str, 'unlimited 2'); | 73 is($s->io($str), $str, 'unlimited 2'); |
74 | 74 |
75 # datagram doesn't get split | 75 # datagram doesn't get split |
76 | 76 |
77 my $t1; | |
78 | |
79 TODO: { | |
80 local $TODO = 'split datagram' unless $t->has_version('1.15.9'); | |
81 | |
77 $s = dgram('127.0.0.1:' . port(8983)); | 82 $s = dgram('127.0.0.1:' . port(8983)); |
78 is($s->io($str), $str, 'download'); | 83 is($s->io($str), $str, 'download'); |
79 my $t1 = time(); | 84 $t1 = time(); |
80 is($s->io($str), $str, 'download 2'); | 85 is($s->io($str), $str, 'download 2'); |
86 | |
87 } | |
88 | |
81 my $t2 = time(); | 89 my $t2 = time(); |
82 cmp_ok($t1, '<', $t2, 'download 2 delayed'); | 90 cmp_ok($t1, '<', $t2, 'download 2 delayed'); |
91 | |
92 TODO: { | |
93 todo_skip 'infinite event report', 3 unless $t->has_version('1.15.9'); | |
83 | 94 |
84 $s = dgram('127.0.0.1:' . port(8984)); | 95 $s = dgram('127.0.0.1:' . port(8984)); |
85 is($s->io($str), $str, 'upload'); | 96 is($s->io($str), $str, 'upload'); |
86 is($s->io($str, read_timeout => 0.5), '', 'upload limited'); | 97 is($s->io($str, read_timeout => 0.5), '', 'upload limited'); |
87 | 98 |
88 select undef, undef, undef, 1.6; | 99 select undef, undef, undef, 1.6; |
89 is($s->io($str), $str, 'upload passed'); | 100 is($s->io($str), $str, 'upload passed'); |
101 | |
102 } | |
90 | 103 |
91 ############################################################################### | 104 ############################################################################### |
92 | 105 |
93 sub udp_daemon { | 106 sub udp_daemon { |
94 my ($port, $t) = @_; | 107 my ($port, $t) = @_; |