MCPcopy
hub / github.com/pocketbase/pocketbase / TestBaseAppTriggerOnTerminate

Function TestBaseAppTriggerOnTerminate

core/base_test.go:556–570  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

554}
555
556func TestBaseAppTriggerOnTerminate(t *testing.T) {
557 t.Parallel()
558
559 app, _ := tests.NewTestApp()
560 defer app.Cleanup()
561
562 event := new(core.TerminateEvent)
563 event.App = app
564
565 // trigger OnTerminate multiple times to ensure that it doesn't deadlock
566 // https://github.com/pocketbase/pocketbase/pull/7305
567 app.OnTerminate().Trigger(event)
568 app.OnTerminate().Trigger(event)
569 app.OnTerminate().Trigger(event)
570}

Callers

nothing calls this directly

Calls 4

CleanupMethod · 0.95
NewTestAppFunction · 0.92
TriggerMethod · 0.80
OnTerminateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…