integration tests: fix connection timeout in 0-RTT test (#4060)

This commit is contained in:
Ameagari 2023-09-02 10:40:35 +08:00 committed by GitHub
parent 090e505aa9
commit 6cde43785f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -852,12 +852,12 @@ var _ = Describe("0-RTT", func() {
Expect(conn.ConnectionState().Used0RTT).To(BeTrue())
Expect(receivedMessage).To(Equal(sentMessage))
Expect(conn.CloseWithError(0, "")).To(Succeed())
num0RTT := atomic.LoadUint32(num0RTTPackets)
fmt.Fprintf(GinkgoWriter, "Sent %d 0-RTT packets.", num0RTT)
Expect(num0RTT).ToNot(BeZero())
zeroRTTPackets := get0RTTPackets(tracer.getRcvdLongHeaderPackets())
Expect(zeroRTTPackets).To(HaveLen(1))
Expect(conn.CloseWithError(0, "")).To(Succeed())
})
It("rejects 0-RTT datagrams when the server doesn't support datagrams anymore", func() {
@ -907,10 +907,10 @@ var _ = Describe("0-RTT", func() {
Expect(conn.ConnectionState().SupportsDatagrams).To(BeFalse())
Expect(conn.ConnectionState().Used0RTT).To(BeFalse())
Expect(conn.CloseWithError(0, "")).To(Succeed())
num0RTT := atomic.LoadUint32(num0RTTPackets)
fmt.Fprintf(GinkgoWriter, "Sent %d 0-RTT packets.", num0RTT)
Expect(num0RTT).ToNot(BeZero())
Expect(get0RTTPackets(tracer.getRcvdLongHeaderPackets())).To(BeEmpty())
Expect(conn.CloseWithError(0, "")).To(Succeed())
})
})

View file

@ -989,13 +989,13 @@ var _ = Describe("0-RTT", func() {
<-received
Expect(conn.ConnectionState().Used0RTT).To(BeTrue())
Expect(conn.CloseWithError(0, "")).To(Succeed())
Expect(receivedMessage).To(Equal(sentMessage))
num0RTT := atomic.LoadUint32(num0RTTPackets)
fmt.Fprintf(GinkgoWriter, "Sent %d 0-RTT packets.", num0RTT)
Expect(num0RTT).ToNot(BeZero())
zeroRTTPackets := get0RTTPackets(tracer.getRcvdLongHeaderPackets())
Expect(zeroRTTPackets).To(HaveLen(1))
Expect(conn.CloseWithError(0, "")).To(Succeed())
})
It("rejects 0-RTT datagrams when the server doesn't support datagrams anymore", func() {
@ -1047,10 +1047,10 @@ var _ = Describe("0-RTT", func() {
Expect(conn.ConnectionState().SupportsDatagrams).To(BeFalse())
Expect(conn.ConnectionState().Used0RTT).To(BeFalse())
Expect(conn.CloseWithError(0, "")).To(Succeed())
num0RTT := atomic.LoadUint32(num0RTTPackets)
fmt.Fprintf(GinkgoWriter, "Sent %d 0-RTT packets.", num0RTT)
Expect(num0RTT).ToNot(BeZero())
Expect(get0RTTPackets(tracer.getRcvdLongHeaderPackets())).To(BeEmpty())
Expect(conn.CloseWithError(0, "")).To(Succeed())
})
})