MCPcopy Index your code
hub / github.com/coder/coder / newSubscribers

Function newSubscribers

coderd/x/chatd/streamcollector_internal_test.go:163–170  ·  view source on GitHub ↗
(t *testing.T, n int)

Source from the content-addressed store, hash-verified

161}
162
163func newSubscribers(t *testing.T, n int) map[uuid.UUID]chan codersdk.ChatStreamEvent {
164 t.Helper()
165 subs := make(map[uuid.UUID]chan codersdk.ChatStreamEvent, n)
166 for range n {
167 subs[uuid.New()] = make(chan codersdk.ChatStreamEvent, 1)
168 }
169 return subs
170}
171
172// TestStreamStateCollector_BufferDroppedIncrementsOnCapacity pre-fills
173// a buffer to capacity and asserts stream_buffer_dropped_total

Callers 1

TestStreamStateCollectorFunction · 0.85

Calls 2

HelperMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected