Mercurial > hg > nginx-tests
comparison quic_retry.t @ 1987:a095b971fbcc default tip
Tests: removed TODO and try_run() checks for legacy versions.
For h2_http2.t, try_run() is preserved to ensure that deprecation
warnings for "listen ... http2" are suppressed, yet plan() is reported
before try_run(), so failure to start will be properly reported.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 04 Jun 2024 18:38:01 +0300 |
parents | 24482e311749 |
children |
comparison
equal
deleted
inserted
replaced
1986:11463d379570 | 1987:a095b971fbcc |
---|---|
108 ($frame) = grep { $_->{type} eq "CONNECTION_CLOSE" } @$frames; | 108 ($frame) = grep { $_->{type} eq "CONNECTION_CLOSE" } @$frames; |
109 is($frame->{error}, 11, 'retry token invalid'); | 109 is($frame->{error}, 11, 'retry token invalid'); |
110 | 110 |
111 # connection with retry token, corrupted | 111 # connection with retry token, corrupted |
112 | 112 |
113 TODO: { | |
114 local $TODO = 'not yet' unless $t->has_version('1.25.2'); | |
115 | |
116 substr($retry_token, 32) ^= "\xff"; | 113 substr($retry_token, 32) ^= "\xff"; |
117 $s = Test::Nginx::HTTP3->new(8980, token => $retry_token, probe => 1); | 114 $s = Test::Nginx::HTTP3->new(8980, token => $retry_token, probe => 1); |
118 $frames = $s->read(all => [{ type => 'CONNECTION_CLOSE' }]); | 115 $frames = $s->read(all => [{ type => 'CONNECTION_CLOSE' }]); |
119 | 116 |
120 ($frame) = grep { $_->{type} eq "CONNECTION_CLOSE" } @$frames; | 117 ($frame) = grep { $_->{type} eq "CONNECTION_CLOSE" } @$frames; |
121 is($frame->{error}, 11, 'retry token decrypt error'); | 118 is($frame->{error}, 11, 'retry token decrypt error'); |
122 | 119 |
123 } | |
124 | |
125 # resending client Initial packets after receiving a Retry packet | 120 # resending client Initial packets after receiving a Retry packet |
126 # to simulate server Initial packet loss triggering its retransmit, | 121 # to simulate server Initial packet loss triggering its retransmit, |
127 # used to create extra nginx connections before 8f7e6d8c061e, | 122 # used to create extra nginx connections before 8f7e6d8c061e, |
128 # caught by CRYPTO stream mismatch among server Initial packets | 123 # caught by CRYPTO stream mismatch among server Initial packets |
129 | |
130 TODO: { | |
131 local $TODO = 'not yet' unless $t->has_version('1.25.3'); | |
132 | 124 |
133 $s = new_connection_resend(); | 125 $s = new_connection_resend(); |
134 $sid = $s->new_stream(); | 126 $sid = $s->new_stream(); |
135 | 127 |
136 eval { | 128 eval { |
138 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); | 130 $frames = $s->read(all => [{ sid => $sid, fin => 1 }]); |
139 }; | 131 }; |
140 | 132 |
141 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; | 133 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; |
142 is($frame->{headers}->{':status'}, 403, 'resend initial'); | 134 is($frame->{headers}->{':status'}, 403, 'resend initial'); |
143 | |
144 } | |
145 | 135 |
146 ############################################################################### | 136 ############################################################################### |
147 | 137 |
148 # expanded handshake version to send repetitive Initial packets | 138 # expanded handshake version to send repetitive Initial packets |
149 | 139 |