Skip to content

Commit

Permalink
[FAB-12766] increase temporal threshold in tests
Browse files Browse the repository at this point in the history
Change-Id: I5bd6966b88fd5ce87b9d39b3f94d5e8e8ba07346
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm committed Nov 7, 2018
1 parent be90d3c commit ce54f14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/grpclogging/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import (
"google.golang.org/grpc/status"
)

const TimeThreshold = 100 * time.Millisecond

var _ = Describe("Server", func() {
var (
fakeEchoService *fakes.EchoServiceServer
Expand Down Expand Up @@ -190,7 +192,7 @@ var _ = Describe("Server", func() {
Expect(ok).To(BeTrue())
Expect(field.Type).To(Equal(zapcore.TimeType))
Expect(field.Integer).NotTo(BeZero())
Expect(time.Unix(0, field.Integer)).To(BeTemporally("~", deadline, 10*time.Millisecond))
Expect(time.Unix(0, field.Integer)).To(BeTemporally("~", deadline, TimeThreshold))
case "grpc.peer_address":
Expect(field.Type).To(Equal(zapcore.StringType))
Expect(field.String).To(HavePrefix("127.0.0.1"))
Expand Down Expand Up @@ -370,7 +372,7 @@ var _ = Describe("Server", func() {
Expect(ok).To(BeTrue())
Expect(field.Type).To(Equal(zapcore.TimeType))
Expect(field.Integer).NotTo(BeZero())
Expect(time.Unix(0, field.Integer)).To(BeTemporally("~", deadline, 10*time.Millisecond))
Expect(time.Unix(0, field.Integer)).To(BeTemporally("~", deadline, TimeThreshold))
case "grpc.peer_address":
Expect(field.Type).To(Equal(zapcore.StringType))
Expect(field.String).To(HavePrefix("127.0.0.1"))
Expand Down

0 comments on commit ce54f14

Please sign in to comment.