Home / Function/ Test_Test_Timeout() — fiber Function Reference

Test_Test_Timeout() — fiber Function Reference

Architecture documentation for the Test_Test_Timeout() function in app_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  a3007fde_a169_de57_5f55_37cec6261a68["Test_Test_Timeout()"]
  e728fdd2_242f_706b_c1d2_041b3d6badb5["app_test.go"]
  a3007fde_a169_de57_5f55_37cec6261a68 -->|defined in| e728fdd2_242f_706b_c1d2_041b3d6badb5
  style a3007fde_a169_de57_5f55_37cec6261a68 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

app_test.go lines 1968–1990

func Test_Test_Timeout(t *testing.T) {
	t.Parallel()
	app := New()

	app.Get("/", testEmptyHandler)

	resp, err := app.Test(httptest.NewRequest(MethodGet, "/", http.NoBody), TestConfig{
		Timeout: 0,
	})
	require.NoError(t, err, "app.Test(req)")
	require.Equal(t, 200, resp.StatusCode, "Status code")

	app.Get("timeout", func(_ Ctx) error {
		time.Sleep(200 * time.Millisecond)
		return nil
	})

	_, err = app.Test(httptest.NewRequest(MethodGet, "/timeout", http.NoBody), TestConfig{
		Timeout:       20 * time.Millisecond,
		FailOnTimeout: true,
	})
	require.Error(t, err, "app.Test(req)")
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_Test_Timeout() do?
Test_Test_Timeout() is a function in the fiber codebase, defined in app_test.go.
Where is Test_Test_Timeout() defined?
Test_Test_Timeout() is defined in app_test.go at line 1968.

Analyze Your Own Codebase

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

Try Supermodel Free