Skip to content

Commit

Permalink
fix the url source test
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfone committed Jun 13, 2019
1 parent 877b309 commit a7349ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"net/http"
"os"
"testing"
"time"

"github.com/urfave/cli"
)
Expand Down Expand Up @@ -186,6 +187,7 @@ func TestNewURLSource(t *testing.T) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.Write([]byte(`{"opt": 123}`))
}))
time.Sleep(time.Millisecond * 50) // Wait that the http server finishes to start.

conf := New()
conf.RegisterOpt(IntOpt("opt", ""))
Expand Down

0 comments on commit a7349ee

Please sign in to comment.