chore: rename coder -> primary

This commit is contained in:
adamdottv
2025-05-12 14:32:27 -05:00
parent c9b90dd184
commit 36e5ae804e
18 changed files with 56 additions and 55 deletions

View File

@@ -51,12 +51,12 @@ func TestBrokerPublish(t *testing.T) {
ch := broker.Subscribe(ctx)
// Publish a message
broker.Publish("created", "test message")
broker.Publish(EventTypeCreated, "test message")
// Verify message is received
select {
case event := <-ch:
assert.Equal(t, "created", event.Type)
assert.Equal(t, EventTypeCreated, 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("created", i)
broker.Publish(EventTypeCreated, i)
}
// Wait for all subscribers to finish