Mercurial > hg > nginx-tests
changeset 1932:b68471aee5ad
Tests: improved test for a stream initiating QUIC path migration.
Previously, the test mostly passed due to a push timer scheduled for an
unrelated delayed ACK, and the new path had enough data received to send
response back when the push timer fired. Otherwise, the test could fail
due to unvalidated address. Now it is fixed to perform path validation.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 21 Aug 2023 17:10:57 +0400 |
parents | afe4af958e53 |
children | 9bafe7cddd3c |
files | quic_migration.t |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/quic_migration.t Fri Aug 18 17:10:22 2023 +0400 +++ b/quic_migration.t Mon Aug 21 17:10:57 2023 +0400 @@ -129,7 +129,13 @@ $s->{scid} = "connection_id_1"; $s->{dcid} = $frame->{cid}; -$frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]); +my $sid = $s->new_stream(); + +$frames = $s->read(all => [{ type => 'PATH_CHALLENGE' }]); +($frame) = grep { $_->{type} eq "PATH_CHALLENGE" } @$frames; +$s->path_response($frame->{data}); + +$frames = $s->read(all => [{ sid => $sid, fin => 1 }]); ($frame) = grep { $_->{type} eq "HEADERS" } @$frames; is($frame->{headers}{'x-ip'}, '127.0.0.1', 'remote addr on migration');