소스 검색

[worker teset] Wait for http server starting

z4yx 5 년 전
부모
커밋
5c140035ec
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      worker/worker_test.go

+ 2 - 0
worker/worker_test.go

@@ -93,6 +93,8 @@ func TestWorker(t *testing.T) {
 		err := httpServer.ListenAndServe()
 		So(err, ShouldBeNil)
 	}()
+	// Wait for http server starting
+	time.Sleep(500 * time.Millisecond)
 
 	Convey("Worker should work", t, func(ctx C) {