Test reliability - give time for HTTP server to start

This commit is contained in:
David Zhao
2021-06-09 13:54:52 -07:00
parent 6278673b46
commit db7d5fff52
2 changed files with 4 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
reconnectParam := r.FormValue("reconnect")
protocolParam := r.FormValue("protocol")
autoSubParam := r.FormValue("auto_subscribe")
// plan b does not work fully at the moment.
planBParam := r.FormValue("planb")
claims := GetGrants(r.Context())

View File

@@ -168,6 +168,9 @@ func (s *LivekitServer) Start() error {
go s.backgroundWorker()
// give time for Serve goroutine to start
time.Sleep(10 * time.Millisecond)
s.running.TrySet(true)
<-s.doneChan