From d5184c6cbdd61571c97462722d8461d5863f813b Mon Sep 17 00:00:00 2001 From: Dima Golomozy Date: Thu, 17 Sep 2020 10:22:25 +0300 Subject: [PATCH] faster latency is not a problem --- input_file_test.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/input_file_test.go b/input_file_test.go index fe53613..09f569e 100644 --- a/input_file_test.go +++ b/input_file_test.go @@ -148,17 +148,11 @@ func TestInputFileRequestsWithLatency(t *testing.T) { } end := time.Now().UnixNano() - var expectedLatency int64 = 250000000 - 100000000 - var delta int64 = 50000000 + var expectedLatency int64 = 300000000 - 100000000 realLatency := end - start - if realLatency < expectedLatency-delta { + if realLatency > expectedLatency { t.Errorf("Should emit requests respecting latency. Expected: %v, real: %v", expectedLatency, realLatency) } - - if realLatency > expectedLatency+delta { - t.Errorf("Should emit requests respecting latency. Expected: %v, real: %v", expectedLatency, realLatency) - - } } func TestInputFileMultipleFilesWithRequestsAndResponses(t *testing.T) {