use a Peek / Pop API for the datagram queue (#3582)

This commit is contained in:
Marten Seemann 2022-10-11 12:25:17 +03:00 committed by GitHub
parent a905648480
commit 1f6a9ecafd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 56 deletions

View file

@ -91,7 +91,7 @@ var _ = Describe("Packet packer", func() {
ackFramer = NewMockAckFrameSource(mockCtrl)
sealingManager = NewMockSealingManager(mockCtrl)
pnManager = mockackhandler.NewMockSentPacketHandler(mockCtrl)
datagramQueue = newDatagramQueue(func() {}, utils.DefaultLogger, version)
datagramQueue = newDatagramQueue(func() {}, utils.DefaultLogger)
packer = newPacketPacker(
protocol.ParseConnectionID([]byte{1, 2, 3, 4, 5, 6, 7, 8}),
@ -634,7 +634,6 @@ var _ = Describe("Packet packer", func() {
Expect(p.ack).ToNot(BeNil())
Expect(p.frames).To(BeEmpty())
Expect(p.buffer.Data).ToNot(BeEmpty())
Expect(done).ToNot(BeClosed())
datagramQueue.CloseWithError(nil)
Eventually(done).Should(BeClosed())
})