Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Jan 22, 2024
1 parent b39455a commit 7af7e4b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func Test_Exec_Func(t *testing.T) {
require.Nil(t, app.Listener(ln, fiber.ListenConfig{DisableStartupMessage: true}))
}()

time.Sleep(300 * time.Millisecond)

t.Run("normal request", func(t *testing.T) {
core, client, req := newCore(), AcquireClient(), AcquireRequest()
core.ctx = context.Background()
Expand Down
10 changes: 10 additions & 0 deletions client/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,9 @@ func Test_Request_Get(t *testing.T) {
app.Get("/", func(c fiber.Ctx) error {
return c.SendString(c.Hostname())
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
req := AcquireRequest().SetDial(ln)
Expand All @@ -615,7 +617,9 @@ func Test_Request_Post(t *testing.T) {
return c.Status(fiber.StatusCreated).
SendString(c.FormValue("foo"))
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand All @@ -639,6 +643,7 @@ func Test_Request_Head(t *testing.T) {
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand All @@ -661,6 +666,7 @@ func Test_Request_Put(t *testing.T) {
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand All @@ -686,6 +692,7 @@ func Test_Request_Delete(t *testing.T) {
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand All @@ -711,6 +718,7 @@ func Test_Request_Options(t *testing.T) {
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand All @@ -736,6 +744,7 @@ func Test_Request_Send(t *testing.T) {
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand All @@ -762,6 +771,7 @@ func Test_Request_Patch(t *testing.T) {
})

go start()
time.Sleep(100 * time.Millisecond)

for i := 0; i < 5; i++ {
resp, err := AcquireRequest().
Expand Down
2 changes: 2 additions & 0 deletions client/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net"
"os"
"testing"
"time"

"github.com/gofiber/fiber/v3/internal/tlstest"

Expand Down Expand Up @@ -266,6 +267,7 @@ func Test_Response_Save(t *testing.T) {
})

go start()
time.Sleep(300 * time.Millisecond)

t.Run("file path", func(t *testing.T) {
resp, err := AcquireRequest().
Expand Down

0 comments on commit 7af7e4b

Please sign in to comment.