Skip to content

Commit

Permalink
Set timeout for http client
Browse files Browse the repository at this point in the history
  • Loading branch information
owenthereal committed Oct 2, 2023
1 parent fb63a11 commit 5a90164
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func Test_Server(t *testing.T) {
errch <- err
}()

http := &http.Client{
Timeout: 2 * time.Second,
}

t.Run("http addr", func(t *testing.T) {
waitUntil(t, 5*time.Second, 10, func() error {
resp, err := http.Get(fmt.Sprintf("http://%s/config/apps/http/servers/http/listen/0", adminAddr))
Expand Down

0 comments on commit 5a90164

Please sign in to comment.