MCPcopy Create free account
hub / github.com/facebook/time / TestDecRunningHandlers

Function TestDecRunningHandlers

cmd/ziffy/node/receiver_test.go:68–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestDecRunningHandlers(t *testing.T) {
69 r := Receiver{
70 Config: &Config{PTPRecvHandlers: 2},
71 runningHandlers: 2,
72 }
73
74 require.Equal(t, true, r.decRunningHandlers())
75 require.Equal(t, 1, r.runningHandlers)
76 require.Equal(t, true, r.decRunningHandlers())
77 require.Equal(t, 0, r.runningHandlers)
78 require.Equal(t, false, r.decRunningHandlers())
79}
80
81func TestHandlePacket(t *testing.T) {
82 packet := gopacket.NewPacket(syncPTPPacket, layers.LinkTypeEthernet, gopacket.DecodeOptions{Lazy: true, NoCopy: true})

Callers

nothing calls this directly

Calls 1

decRunningHandlersMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…