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

Function TestUpgraderConcurrentUpgrade

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

Source from the content-addressed store, hash-verified

313}
314
315func TestUpgraderConcurrentUpgrade(t *testing.T) {
316 t.Parallel()
317
318 u := newTestUpgrader(Options{})
319 defer u.Stop()
320
321 new, _ := u.upgradeProc(t)
322
323 go new.recvSignal(nil)
324
325 if err := u.Upgrade(); err == nil {
326 t.Error("Expected Upgrade to refuse concurrent upgrade")
327 }
328
329 new.exit(nil)
330}
331
332func TestHasParent(t *testing.T) {
333 t.Parallel()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…