From 6663be4390aeb77eccbba1f9aae6f12e2a789359 Mon Sep 17 00:00:00 2001 From: Patrick Peng Sun Date: Sun, 28 May 2017 01:10:13 +1000 Subject: [PATCH] video download has to wait for a while to compare the downloaded file, otherwise we simply get empty file. --- upload_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upload_test.go b/upload_test.go index 395fc6b..1e13aea 100644 --- a/upload_test.go +++ b/upload_test.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/udhos/equalfile" @@ -39,7 +40,7 @@ func TestUploadVideo(t *testing.T) { assert.NotEqual(t, mediaID, "", "MediaID should not be Empty") //wait for a while for the video to be procssed - //time.Sleep(3000 * time.Millisecond) + time.Sleep(3 * time.Second) //download the media back using the media id filename, e := saveMedia2File(mediaID) // this is a json with video link, we should download it and compare it.