forked from quic-go/quic-go
fix race condition in the TLS extension handler test
This commit is contained in:
@@ -84,12 +84,15 @@ var _ = Describe("TLS Extension Handler, for the server", func() {
|
||||
})
|
||||
|
||||
It("ignores extensions that are not sent with the ClientHello", func() {
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
defer GinkgoRecover()
|
||||
handlerServer.ReceivedExtensions(uint8(typeFinished), chExts)
|
||||
close(done)
|
||||
}()
|
||||
|
||||
Consistently(handlerServer.TransportParameters()).ShouldNot(Receive())
|
||||
Eventually(done).Should(BeClosed())
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -153,12 +156,15 @@ var _ = Describe("TLS Extension Handler, for the server", func() {
|
||||
})
|
||||
|
||||
It("ignores extensions that are not sent with the EncryptedExtensions", func() {
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
defer GinkgoRecover()
|
||||
handlerClient.ReceivedExtensions(uint8(typeFinished), chExts)
|
||||
close(done)
|
||||
}()
|
||||
|
||||
Consistently(handlerClient.TransportParameters()).ShouldNot(Receive())
|
||||
Eventually(done).Should(BeClosed())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user