mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 04:07:35 +03:00
transport: fix flaky stateless reset test (#3810)
This commit is contained in:
parent
22d6b0e626
commit
da198b710b
1 changed files with 3 additions and 0 deletions
|
@ -235,13 +235,16 @@ var _ = Describe("Transport", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
b = append(b, token[:]...)
|
||||
conn := NewMockPacketHandler(mockCtrl)
|
||||
destroyed := make(chan struct{})
|
||||
gomock.InOrder(
|
||||
phm.EXPECT().GetByResetToken(token).Return(conn, true),
|
||||
conn.EXPECT().destroy(gomock.Any()).Do(func(err error) {
|
||||
Expect(err).To(MatchError(&StatelessResetError{Token: token}))
|
||||
close(destroyed)
|
||||
}),
|
||||
)
|
||||
packetChan <- packetToRead{data: b}
|
||||
Eventually(destroyed).Should(BeClosed())
|
||||
|
||||
// shutdown
|
||||
phm.EXPECT().Close(gomock.Any())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue