Skip to content

Commit a737858

Browse files
committed
Tests: simplified QUIC tests for discarding 0-RTT keys.
Testing for regressions in discarding 0-RTT keys is now separated from 1-RTT stream tests. Completing a QUIC handshake in tests includes sending some 1-RTT data in control and encoder streams. This is enough to trigger the bug fixed in 930caed3b (1.27.4). Also, this improves test stability due to a pending bug in HTTP3.pm, which causes certain QUIC frames to be not reported when received together with stream frames in a single packet.
1 parent a09ea7a commit a737858

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

h3_ssl_early_data.t

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,23 @@ is($frame->{headers}->{'x-early'}, '1', 'reused session is early');
101101

102102
}
103103

104-
$s->send_chain();
104+
# includes sending some initial 1-RTT data
105105

106-
$frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
106+
$s->send_chain();
107107

108108
TODO: {
109109
local $TODO = 'not yet'
110110
if $t->has_version('1.27.1') && !$t->has_version('1.27.4');
111111

112+
$frames = $s->read(all => [{ type => 'HANDSHAKE_DONE' }], wait => 0.5);
113+
112114
($frame) = grep { $_->{type} eq "HANDSHAKE_DONE" } @$frames;
113115
ok($frame, '1rtt after discarding 0rtt');
114116

115117
}
116118

119+
$frames = $s->read(all => [{ sid => $s->new_stream(), fin => 1 }]);
120+
117121
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
118122
is($frame->{headers}->{'x-session'}, 'r', 'reused session 1rtt');
119123
is($frame->{headers}->{'x-early'}, undef, 'reused session not early');

0 commit comments

Comments
 (0)