changeset 1942:00124c7d0ef1

Tests: made sure migrated QUIC connection didn't get stall. While working on connection migration patches, it was observed that connections could easly stuck due to bugs in bytes in-flight accounting. Added a simple test to make sure more data can be sent after confirming a client's ownership of its new address.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 11 Dec 2023 14:13:03 +0400
parents 2c4f1019ee0d
children 1786f49cca17
files quic_migration.t
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/quic_migration.t
+++ b/quic_migration.t
@@ -27,7 +27,7 @@ plan(skip_all => '127.0.0.20 local addre
 	unless defined IO::Socket::INET->new( LocalAddr => '127.0.0.20' );
 
 my $t = Test::Nginx->new()->has(qw/http http_v3 cryptx/)
-	->has_daemon('openssl')->plan(2);
+	->has_daemon('openssl')->plan(3);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -106,6 +106,10 @@ my ($frame) = grep { $_->{type} eq "NCID
 ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
 is($frame->{headers}{'x-ip'}, '127.0.0.20', 'remote addr after migration');
 
+$frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
+($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
+is($frame->{headers}{'x-ip'}, '127.0.0.20', 'next packets after migration');
+
 # test that $remote_addr is not truncated while in the process of migration;
 # the same but migration occurs on receiving a request stream itself,
 # which is the first non-probing frame on the new path;