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

Function TestSequentialHandlerMultipleChannel

sequential_handler_test.go:47–61  ·  view source on GitHub ↗

Test that in the case of multiple destination channels, one channel being blocked does not prevent the other channel receiving messages.

(t *testing.T)

Source from the content-addressed store, hash-verified

45// Test that in the case of multiple destination channels, one channel
46// being blocked does not prevent the other channel receiving messages.
47func TestSequentialHandlerMultipleChannel(t *testing.T) {
48 t.Parallel()
49
50 handler := NewSequentialSignalHandler()
51
52 channelOne := make(chan *Signal)
53 handler.(SignalRegistrar).AddSignal(channelOne)
54
55 channelTwo := make(chan *Signal, 10)
56 handler.(SignalRegistrar).AddSignal(channelTwo)
57
58 writeSignals(handler, 1000)
59
60 readSignals(t, channelTwo)
61}
62
63// Test that removing one channel results in no more messages being
64// written to that channel.

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…