Use `Eventually` in time-sensitive assertion
@@ -202,7 +202,9 @@ var _ = Describe("HttpsWriter", func() {
// one connection per request
requester.concurrentWriteRequests(2, w)
- Expect(listener.GetHistoryLength()).To(Equal(2))
+ Eventually(func() int {
+ return listener.GetHistoryLength()
+ }).Should(Equal(2))
// one pooled connection, one new connection
requester.concurrentWriteRequests(2, w)
