comparison stream_udp_limit_rate.t @ 1431:aab729315dca

Tests: stream_udp_limit_rate.t TODOs removed, fix committed.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 17 Jan 2019 19:29:18 +0300
parents bba26f4b40ef
children d17fb72140f2
comparison
equal deleted inserted replaced
1430:bba26f4b40ef 1431:aab729315dca
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';
81
82 $s = dgram('127.0.0.1:' . port(8983)); 77 $s = dgram('127.0.0.1:' . port(8983));
83 is($s->io($str), $str, 'download'); 78 is($s->io($str), $str, 'download');
84 $t1 = time(); 79 my $t1 = time();
85 is($s->io($str), $str, 'download 2'); 80 is($s->io($str), $str, 'download 2');
86
87 }
88
89 my $t2 = time(); 81 my $t2 = time();
90 cmp_ok($t1, '<', $t2, 'download 2 delayed'); 82 cmp_ok($t1, '<', $t2, 'download 2 delayed');
91 83
92 TODO: {
93 todo_skip 'infinite event report', 3;
94
95 $s = dgram('127.0.0.1:' . port(8984)); 84 $s = dgram('127.0.0.1:' . port(8984));
96 is($s->io($str), $str, 'upload'); 85 is($s->io($str), $str, 'upload');
97
98 is($s->io($str, read_timeout => 0.5), '', 'upload limited'); 86 is($s->io($str, read_timeout => 0.5), '', 'upload limited');
99 87
100 select undef, undef, undef, 0.6; 88 select undef, undef, undef, 0.6;
101
102 is($s->io($str), $str, 'upload passed'); 89 is($s->io($str), $str, 'upload passed');
103
104 }
105 90
106 ############################################################################### 91 ###############################################################################
107 92
108 sub udp_daemon { 93 sub udp_daemon {
109 my ($port, $t) = @_; 94 my ($port, $t) = @_;