Skip to content

Commit

Permalink
Give loginserver some time to start in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
maeb committed Jun 2, 2023
1 parent 9c77e3e commit 331632f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connection/loginserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ func TestLoginServer(t *testing.T) {
}
}()

// Wait for server to start
time.Sleep(100 * time.Millisecond)

req, err := http.NewRequestWithContext(context.TODO(), http.MethodGet, autoRedirectURI, nil)
if err != nil {
t.Error(err)
Expand All @@ -39,7 +42,7 @@ func TestLoginServer(t *testing.T) {
req.URL.RawQuery = q.Encode()
resp, err := http.DefaultClient.Do(req)
if err != nil {
t.Error(err)
t.Fatal(err)
}
defer resp.Body.Close()

Expand Down

0 comments on commit 331632f

Please sign in to comment.