MCPcopy Create free account
hub / github.com/godbus/dbus / TestSequentialHandlerNoDrop

Function TestSequentialHandlerNoDrop

sequential_handler_test.go:11–22  ·  view source on GitHub ↗

Verifies that no signals are dropped, even if there is not enough space in the destination channel.

(t *testing.T)

Source from the content-addressed store, hash-verified

9// Verifies that no signals are dropped, even if there is not enough space
10// in the destination channel.
11func TestSequentialHandlerNoDrop(t *testing.T) {
12 t.Parallel()
13
14 handler := NewSequentialSignalHandler()
15
16 channel := make(chan *Signal, 2)
17 handler.(SignalRegistrar).AddSignal(channel)
18
19 writeSignals(handler, 1000)
20
21 readSignals(t, channel)
22}
23
24// Verifies that signals are written to the destination channel in the
25// order they are received, in a typical concurrent reader/writer scenario.

Callers

nothing calls this directly

Calls 4

writeSignalsFunction · 0.85
readSignalsFunction · 0.85
AddSignalMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…