Home / Function/ Test_Client_ConcurrencyRequests() — fiber Function Reference

Test_Client_ConcurrencyRequests() — fiber Function Reference

Architecture documentation for the Test_Client_ConcurrencyRequests() function in client_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  8d6093b3_ab94_fe85_7b37_b7d7a7eb0920["Test_Client_ConcurrencyRequests()"]
  5d11d0f7_2b3b_7bf3_3b1d_76d79d6872a2["client_test.go"]
  8d6093b3_ab94_fe85_7b37_b7d7a7eb0920 -->|defined in| 5d11d0f7_2b3b_7bf3_3b1d_76d79d6872a2
  style 8d6093b3_ab94_fe85_7b37_b7d7a7eb0920 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

client/client_test.go lines 841–865

func Test_Client_ConcurrencyRequests(t *testing.T) {
	t.Parallel()

	app, dial, start := createHelperServer(t)
	app.All("/", func(c fiber.Ctx) error {
		return c.SendString(c.Hostname() + " " + c.Method())
	})
	go start()

	client := New().SetDial(dial)

	wg := sync.WaitGroup{}
	for range 5 {
		for _, method := range []string{"GET", "POST", "PUT", "DELETE", "PATCH"} {
			m := method
			wg.Go(func() {
				resp, err := client.Custom("http://example.com", m)
				require.NoError(t, err)
				assert.Equal(t, "example.com "+m, utils.UnsafeString(resp.RawResponse.Body()))
			})
		}
	}

	wg.Wait()
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Client_ConcurrencyRequests() do?
Test_Client_ConcurrencyRequests() is a function in the fiber codebase, defined in client/client_test.go.
Where is Test_Client_ConcurrencyRequests() defined?
Test_Client_ConcurrencyRequests() is defined in client/client_test.go at line 841.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free