MCPcopy
hub / github.com/cloudflare/tableflip / TestUpgraderTimeout

Function TestUpgraderTimeout

upgrader_test.go:266–283  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

264}
265
266func TestUpgraderTimeout(t *testing.T) {
267 t.Parallel()
268
269 u := newTestUpgrader(Options{
270 UpgradeTimeout: 10 * time.Millisecond,
271 })
272 defer u.Stop()
273
274 new, errs := u.upgradeProc(t)
275
276 if sig := new.recvSignal(nil); sig != os.Kill {
277 t.Error("Expected os.Kill, got", sig)
278 }
279
280 if err := <-errs; err == nil {
281 t.Error("Expected Upgrade to return error when new child times out")
282 }
283}
284
285func TestUpgraderListenConfig(t *testing.T) {
286 t.Parallel()

Callers

nothing calls this directly

Calls 4

newTestUpgraderFunction · 0.85
upgradeProcMethod · 0.80
recvSignalMethod · 0.80
StopMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…