Skip to content

Commit

Permalink
Merge pull request quic-go#1945 from lucas-clemente/fix-flaky-token-g…
Browse files Browse the repository at this point in the history
…enerator-test

fix flaky token generator test on CI
  • Loading branch information
marten-seemann authored Jun 2, 2019
2 parents 7fbae1c + d4da26b commit 784ed16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/handshake/token_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = Describe("Token Generator", func() {
token, err := tokenGen.DecodeToken(tokenEnc)
Expect(err).ToNot(HaveOccurred())
Expect(token.RemoteAddr).To(Equal("192.168.0.1"))
Expect(token.SentTime).To(BeTemporally("~", time.Now(), 10*time.Millisecond))
Expect(token.SentTime).To(BeTemporally("~", time.Now(), 100*time.Millisecond))
Expect(token.OriginalDestConnectionID).To(BeNil())
})

Expand Down Expand Up @@ -106,7 +106,7 @@ var _ = Describe("Token Generator", func() {
token, err := tokenGen.DecodeToken(tokenEnc)
Expect(err).ToNot(HaveOccurred())
Expect(token.RemoteAddr).To(Equal(ip.String()))
Expect(token.SentTime).To(BeTemporally("~", time.Now(), 10*time.Millisecond))
Expect(token.SentTime).To(BeTemporally("~", time.Now(), 100*time.Millisecond))
}
})

Expand All @@ -117,6 +117,6 @@ var _ = Describe("Token Generator", func() {
token, err := tokenGen.DecodeToken(tokenEnc)
Expect(err).ToNot(HaveOccurred())
Expect(token.RemoteAddr).To(Equal("192.168.13.37:1337"))
Expect(token.SentTime).To(BeTemporally("~", time.Now(), 10*time.Millisecond))
Expect(token.SentTime).To(BeTemporally("~", time.Now(), 100*time.Millisecond))
})
})

0 comments on commit 784ed16

Please sign in to comment.