forked from quic-go/quic-go
fix flaky handshake limiting test (#4270)
This commit is contained in:
@@ -807,12 +807,17 @@ var _ = Describe("Server", func() {
|
||||
_, err := serv.Accept(context.Background())
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
// make sure we can enqueue and accept more connections after that
|
||||
for i := 0; i < limit; i++ {
|
||||
conn := NewMockQUICConn(mockCtrl)
|
||||
conn.EXPECT().closeWithTransportError(gomock.Any()).MaxTimes(1) // called when the server is closed
|
||||
connChan <- conn
|
||||
serv.handlePacket(getInitialWithRandomDestConnID())
|
||||
}
|
||||
for i := 0; i < limit; i++ {
|
||||
_, err := serv.Accept(context.Background())
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user