From 021fbce572b644acb2ceac8d01391be93c9a56da Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Wed, 17 Jan 2024 12:51:04 -0300 Subject: [PATCH] record-tester: Increase tolerance for MP4 dur diff --- internal/app/recordtester/recordtester_app.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/app/recordtester/recordtester_app.go b/internal/app/recordtester/recordtester_app.go index d2634b8e..fc3147f4 100644 --- a/internal/app/recordtester/recordtester_app.go +++ b/internal/app/recordtester/recordtester_app.go @@ -21,6 +21,8 @@ import ( "github.com/livepeer/stream-tester/model" ) +const mp4DurationDiffTolerance = 6 * time.Second + type ( // IRecordTester ... IRecordTester interface { @@ -490,7 +492,7 @@ func (rt *recordTester) checkDownMp4(stream *api.Stream, url string, streamDurat if durDiff < 0 { durDiff = -durDiff } - if durDiff > 2*time.Second { + if durDiff > mp4DurationDiffTolerance { ers := fmt.Errorf("duration of mp4 differ by %s (got %s, should %s)", durDiff, dur, streamDuration) glog.Error(ers) return 300, ers