(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func 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 | |
| 105 | func TestQueue_RegisterHandlerAfterSend(t *testing.T) { |
| 106 | q := New[*testMessage]("test", 10) |