Home / Function/ Test_App_Prefork_Child_Process() — fiber Function Reference

Test_App_Prefork_Child_Process() — fiber Function Reference

Architecture documentation for the Test_App_Prefork_Child_Process() function in prefork_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  27aaa867_4970_2099_6140_1161712f9cc8["Test_App_Prefork_Child_Process()"]
  6fe215fa_3f3d_4def_0d1c_6cf140e007c0["prefork_test.go"]
  27aaa867_4970_2099_6140_1161712f9cc8 -->|defined in| 6fe215fa_3f3d_4def_0d1c_6cf140e007c0
  831a5231_66c7_9c6b_986a_d20e2a7c1b11["setupIsChild()"]
  27aaa867_4970_2099_6140_1161712f9cc8 -->|calls| 831a5231_66c7_9c6b_986a_d20e2a7c1b11
  style 27aaa867_4970_2099_6140_1161712f9cc8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

prefork_test.go lines 18–53

func Test_App_Prefork_Child_Process(t *testing.T) {
	// Reset test var
	testPreforkMaster = true

	setupIsChild(t)

	app := New()

	cfg := listenConfigDefault()
	err := app.prefork("invalid", nil, &cfg)
	require.Error(t, err)

	go func() {
		time.Sleep(1000 * time.Millisecond)
		assert.NoError(t, app.Shutdown())
	}()

	ipv6Cfg := ListenConfig{ListenerNetwork: NetworkTCP6}
	require.NoError(t, app.prefork("[::1]:", nil, &ipv6Cfg))

	// Create tls certificate
	cer, err := tls.LoadX509KeyPair("./.github/testdata/ssl.pem", "./.github/testdata/ssl.key")
	if err != nil {
		require.NoError(t, err)
	}
	//nolint:gosec // We're in a test so using old ciphers is fine
	config := &tls.Config{Certificates: []tls.Certificate{cer}}

	go func() {
		time.Sleep(1000 * time.Millisecond)
		assert.NoError(t, app.Shutdown())
	}()

	cfg = listenConfigDefault()
	require.NoError(t, app.prefork("127.0.0.1:", config, &cfg))
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Test_App_Prefork_Child_Process() do?
Test_App_Prefork_Child_Process() is a function in the fiber codebase, defined in prefork_test.go.
Where is Test_App_Prefork_Child_Process() defined?
Test_App_Prefork_Child_Process() is defined in prefork_test.go at line 18.
What does Test_App_Prefork_Child_Process() call?
Test_App_Prefork_Child_Process() calls 1 function(s): setupIsChild.

Analyze Your Own Codebase

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

Try Supermodel Free