chore: cleanup

This commit is contained in:
adamdottv 2025-05-12 11:22:19 -05:00
commit d20d0c5a95
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
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