MCPcopy Index your code
hub / github.com/php/frankenphp / TestFailingWorker

Function TestFailingWorker

frankenphp_test.go:707–715  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

705}
706
707func TestFailingWorker(t *testing.T) {
708 t.Cleanup(frankenphp.Shutdown)
709
710 err := frankenphp.Init(
711 frankenphp.WithWorkers("failing worker", "testdata/failing-worker.php", 4, frankenphp.WithWorkerMaxFailures(1)),
712 frankenphp.WithNumThreads(5),
713 )
714 assert.Error(t, err, "should return an immediate error if workers fail on startup")
715}
716
717func TestEnv_module(t *testing.T) {
718 testEnv(t, &testOptions{nbParallelRequests: 1, phpIni: map[string]string{"variables_order": "EGPCS"}})

Callers

nothing calls this directly

Calls 5

InitFunction · 0.92
WithWorkersFunction · 0.92
WithWorkerMaxFailuresFunction · 0.92
WithNumThreadsFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected