test(quic): cover the peer being told that a ClientQUIC closed

ShouldTellPeerOfCloseQUIC: twenty clients connect to a listener whose
idle timeout is 20 s and are destroyed in turn; for each, the server
side's RecieveDatagramSync, which throws once the peer has closed the
connection, must return within 2 s. Before the fix the first one never
did, since ~ClientQUIC closed its handle before msquic had sent the
CONNECTION_CLOSE frame; the loop stops at the first miss, as every
later connection would wait out its 2 s too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-11-01 02:06:39 +01:00
commit 793b518718
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
2 changed files with 122 additions and 0 deletions

View file

@ -207,6 +207,7 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
cfg.AddTest("ShouldReportListenerPortQUIC").Dependencies({ &cfg });
cfg.AddTest("ShouldShareSelfSignedCertificateQUIC").Dependencies({ &cfg });
cfg.AddTest("ShouldSurviveConnectionChurn").Dependencies({ &cfg });
cfg.AddTest("ShouldTellPeerOfCloseQUIC").Dependencies({ &cfg });
} else {
// Only a --no-quic build can show that msquic stayed out.
cfg.AddTest("ShouldBuildWithoutQUIC").Dependencies({ &cfg });