MCPcopy Index your code
hub / github.com/apache/answer / TestQueue_NoHandlerDropsMessage

Function TestQueue_NoHandlerDropsMessage

internal/base/queue/queue_test.go:94–103  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestQueue_NoHandlerDropsMessage(t *testing.T) {
95 q := New[*testMessage]("test", 10)
96 defer q.Close()
97
98 // Send without handler - should not panic
99 q.Send(context.Background(), &testMessage{ID: 1})
100
101 // Give time for the message to be processed (dropped)
102 time.Sleep(100 * time.Millisecond)
103}
104
105func TestQueue_RegisterHandlerAfterSend(t *testing.T) {
106 q := New[*testMessage]("test", 10)

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.65
SendMethod · 0.65

Tested by

no test coverage detected