Skip to content

Commit

Permalink
Added test change to stop flaky test (#2277)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbdias committed Mar 30, 2023
1 parent f56d33e commit 3d31983
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/integration/ensure_server_prefix_test.go
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"sync"
"testing"
"time"

Expand All @@ -21,9 +22,16 @@ func getTracetestApp(options ...testmock.TestingAppOption) (*app.App, error) {
return nil, err
}

go tracetestApp.Start()
var wg sync.WaitGroup
wg.Add(1)

time.Sleep(1 * time.Second)
go func() {
tracetestApp.Start()
time.Sleep(1 * time.Second)
wg.Done()
}()

wg.Wait()

return tracetestApp, nil
}
Expand Down

0 comments on commit 3d31983

Please sign in to comment.