(t *testing.T)
| 544 | } |
| 545 | |
| 546 | func Test_Hook_OnHook(t *testing.T) { |
| 547 | app := New() |
| 548 | |
| 549 | enableTestPreforkMaster(t) |
| 550 | enableTestOnPrefork(t) |
| 551 | |
| 552 | app.Hooks().OnFork(func(pid int) error { |
| 553 | require.Equal(t, 1, pid) |
| 554 | return nil |
| 555 | }) |
| 556 | |
| 557 | err := app.prefork(":0", nil, &ListenConfig{ |
| 558 | DisableStartupMessage: true, |
| 559 | EnablePrefork: true, |
| 560 | PreforkRecoverThreshold: 1, |
| 561 | }) |
| 562 | require.ErrorIs(t, err, prefork.ErrOverRecovery) |
| 563 | } |
| 564 | |
| 565 | func Test_Hook_OnMount(t *testing.T) { |
| 566 | t.Parallel() |
nothing calls this directly
no test coverage detected