fix race condition in the client session tests

This commit is contained in:
Marten Seemann
2020-05-04 19:23:48 +07:00
parent c0b6d4e141
commit aabdb172ff

View File

@@ -2126,6 +2126,7 @@ var _ = Describe("Client Session", func() {
defer GinkgoRecover()
cryptoSetup.EXPECT().RunHandshake().MaxTimes(1)
errChan <- sess.run()
close(errChan)
}()
})
@@ -2147,6 +2148,7 @@ var _ = Describe("Client Session", func() {
expectClose()
sess.shutdown()
Eventually(sess.Context().Done()).Should(BeClosed())
Eventually(errChan).Should(BeClosed())
})
It("uses the preferred_address connection ID", func() {