Test_Proxy_With_Timeout() — fiber Function Reference
Architecture documentation for the Test_Proxy_With_Timeout() function in proxy_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 612f0ae4_c61f_778e_dec3_f14740e0434c["Test_Proxy_With_Timeout()"] a7c70172_e40a_6ad6_65b6_b8f508cfb0a2["proxy_test.go"] 612f0ae4_c61f_778e_dec3_f14740e0434c -->|defined in| a7c70172_e40a_6ad6_65b6_b8f508cfb0a2 52270b9b_26c8_081b_5239_bee723ca512a["createProxyTestServerIPv4()"] 612f0ae4_c61f_778e_dec3_f14740e0434c -->|calls| 52270b9b_26c8_081b_5239_bee723ca512a style 612f0ae4_c61f_778e_dec3_f14740e0434c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/proxy/proxy_test.go lines 453–477
func Test_Proxy_With_Timeout(t *testing.T) {
t.Parallel()
_, addr := createProxyTestServerIPv4(t, func(c fiber.Ctx) error {
time.Sleep(1 * time.Second)
return c.SendString("fiber is awesome")
})
app := fiber.New()
app.Use(Balancer(Config{
Servers: []string{addr},
Timeout: 100 * time.Millisecond,
}))
resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, "/", http.NoBody), fiber.TestConfig{
Timeout: 2 * time.Second,
FailOnTimeout: true,
})
require.NoError(t, err)
require.Equal(t, fiber.StatusInternalServerError, resp.StatusCode)
b, err := io.ReadAll(resp.Body)
require.NoError(t, err)
require.Equal(t, "timeout", string(b))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Test_Proxy_With_Timeout() do?
Test_Proxy_With_Timeout() is a function in the fiber codebase, defined in middleware/proxy/proxy_test.go.
Where is Test_Proxy_With_Timeout() defined?
Test_Proxy_With_Timeout() is defined in middleware/proxy/proxy_test.go at line 453.
What does Test_Proxy_With_Timeout() call?
Test_Proxy_With_Timeout() calls 1 function(s): createProxyTestServerIPv4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free