Merge pull request #818 from DimaGolomozy/increase-latency-delta

increase-latency-delta-tests
This commit is contained in:
Urban Ishimwe
2020-10-11 21:33:37 +02:00
committed by GitHub
+2 -7
View File
@@ -148,16 +148,11 @@ func TestInputFileRequestsWithLatency(t *testing.T) {
}
end := time.Now().UnixNano()
var expectedLatency int64 = 250000000 - 100000000
var expectedLatency int64 = 300000000 - 100000000
realLatency := end - start
if realLatency < expectedLatency {
if realLatency > expectedLatency {
t.Errorf("Should emit requests respecting latency. Expected: %v, real: %v", expectedLatency, realLatency)
}
if realLatency > expectedLatency+10000000 {
t.Errorf("Should emit requests respecting latency. Expected: %v, real: %v", expectedLatency, realLatency)
}
}
func TestInputFileMultipleFilesWithRequestsAndResponses(t *testing.T) {