From 5eaab7304363b6cce3947792f7fe50781b0c8082 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 15 Sep 2020 10:58:12 +0700 Subject: [PATCH] fix flaky packet number skipping test --- internal/ackhandler/sent_packet_handler_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/ackhandler/sent_packet_handler_test.go b/internal/ackhandler/sent_packet_handler_test.go index 489631d2..f2c242f4 100644 --- a/internal/ackhandler/sent_packet_handler_test.go +++ b/internal/ackhandler/sent_packet_handler_test.go @@ -706,7 +706,8 @@ var _ = Describe("SentPacketHandler", func() { })) Expect(handler.OnLossDetectionTimeout()).To(Succeed()) Expect(handler.SendMode()).To(Equal(SendPTOAppData)) - Expect(handler.PopPacketNumber(protocol.Encryption1RTT)).To(Equal(pn + 2)) + // The packet number generator might have introduced another skipped a packet number. + Expect(handler.PopPacketNumber(protocol.Encryption1RTT)).To(BeNumerically(">=", pn+2)) }) It("only counts ack-eliciting packets as probe packets", func() {