chore: cleanup

This commit is contained in:
adamdottv
2025-05-12 11:22:19 -05:00
parent 5af3c05d41
commit d20d0c5a95
2 changed files with 3 additions and 9 deletions

View File

@@ -51,12 +51,12 @@ func TestBrokerPublish(t *testing.T) {
ch := broker.Subscribe(ctx)
// Publish a message
broker.Publish(CreatedEvent, "test message")
broker.Publish("created", "test message")
// Verify message is received
select {
case event := <-ch:
assert.Equal(t, CreatedEvent, event.Type)
assert.Equal(t, "created", event.Type)
assert.Equal(t, "test message", event.Payload)
case <-time.After(100 * time.Millisecond):
t.Fatal("timeout waiting for message")
@@ -122,7 +122,7 @@ func TestBrokerConcurrency(t *testing.T) {
// Publish messages to all subscribers
for i := range numSubscribers {
broker.Publish(CreatedEvent, i)
broker.Publish("created", i)
}
// Wait for all subscribers to finish