TestTimeout_NegativeDuration() — fiber Function Reference
Architecture documentation for the TestTimeout_NegativeDuration() function in timeout_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 344f2435_dfcb_9b14_34b5_cf97a87b4637["TestTimeout_NegativeDuration()"] bab1b67e_4e42_cfe9_38ec_3f1f6a839718["timeout_test.go"] 344f2435_dfcb_9b14_34b5_cf97a87b4637 -->|defined in| bab1b67e_4e42_cfe9_38ec_3f1f6a839718 style 344f2435_dfcb_9b14_34b5_cf97a87b4637 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/timeout/timeout_test.go lines 199–212
func TestTimeout_NegativeDuration(t *testing.T) {
t.Parallel()
app := fiber.New()
app.Get("/negative", New(func(c fiber.Ctx) error {
time.Sleep(50 * time.Millisecond)
return c.SendString("No timeout used")
}, Config{Timeout: -100 * time.Millisecond}))
req := httptest.NewRequest(fiber.MethodGet, "/negative", http.NoBody)
resp, err := app.Test(req)
require.NoError(t, err, "app.Test(req) should not fail")
require.Equal(t, fiber.StatusOK, resp.StatusCode, "Expected 200 OK with zero timeout")
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestTimeout_NegativeDuration() do?
TestTimeout_NegativeDuration() is a function in the fiber codebase, defined in middleware/timeout/timeout_test.go.
Where is TestTimeout_NegativeDuration() defined?
TestTimeout_NegativeDuration() is defined in middleware/timeout/timeout_test.go at line 199.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free