Parcourir la source

video download has to wait for a while to compare the downloaded file, otherwise we simply get empty file.

master
Patrick Peng Sun il y a 8 ans
Parent
révision
6663be4390
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. +2
    -1
      upload_test.go

+ 2
- 1
upload_test.go Voir le fichier

@@ -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.

Chargement…
Annuler
Enregistrer