Skip to content

Commit 4c2ad80

Browse files
committed
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.
1 parent 4dd18f9 commit 4c2ad80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

quic_migration.t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ plan(skip_all => '127.0.0.20 local address required')
2727
unless defined IO::Socket::INET->new( LocalAddr => '127.0.0.20' );
2828

2929
my $t = Test::Nginx->new()->has(qw/http http_v3 cryptx/)
30-
->has_daemon('openssl')->plan(2);
30+
->has_daemon('openssl')->plan(3);
3131

3232
$t->write_file_expand('nginx.conf', <<'EOF');
3333
@@ -106,6 +106,10 @@ $frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
106106
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
107107
is($frame->{headers}{'x-ip'}, '127.0.0.20', 'remote addr after migration');
108108

109+
$frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
110+
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
111+
is($frame->{headers}{'x-ip'}, '127.0.0.20', 'next packets after migration');
112+
109113
# test that $remote_addr is not truncated while in the process of migration;
110114
# the same but migration occurs on receiving a request stream itself,
111115
# which is the first non-probing frame on the new path;

0 commit comments

Comments
 (0)