Skip to content

Commit

Permalink
Merge pull request #3068 from lucas-clemente/fix-flaky-accept-queue-test
Browse files Browse the repository at this point in the history
fix flaky accept queue integration test
  • Loading branch information
marten-seemann committed Mar 9, 2021
2 parents bd8e241 + 67503f9 commit 547de4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integrationtests/self/handshake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ var _ = Describe("Handshake tests", func() {
Expect(err).ToNot(HaveOccurred())
defer sess.CloseWithError(0, "")
}
time.Sleep(25 * time.Millisecond) // wait a bit for the sessions to be queued
time.Sleep(scaleDuration(20 * time.Millisecond)) // wait a bit for the sessions to be queued

_, err = dial()
Expect(err).To(HaveOccurred())
Expand All @@ -349,12 +349,13 @@ var _ = Describe("Handshake tests", func() {
// Now close the one of the session that are waiting to be accepted.
// This should free one spot in the queue.
Expect(firstSess.CloseWithError(0, ""))
time.Sleep(25 * time.Millisecond)
Eventually(firstSess.Context().Done()).Should(BeClosed())
time.Sleep(scaleDuration(20 * time.Millisecond))

// dial again, and expect that this dial succeeds
_, err = dial()
Expect(err).ToNot(HaveOccurred())
time.Sleep(25 * time.Millisecond) // wait a bit for the session to be queued
time.Sleep(scaleDuration(20 * time.Millisecond)) // wait a bit for the session to be queued

_, err = dial()
Expect(err).To(HaveOccurred())
Expand Down

0 comments on commit 547de4c

Please sign in to comment.