From 9be27c75a2e628f37d349cb1214e3c90521d5f6d Mon Sep 17 00:00:00 2001 From: Amir Mamaghani Date: Fri, 20 Mar 2026 13:21:33 +0100 Subject: [PATCH] fix: replace ConsumeInbound with InboundChan select in client test MessageBus does not expose a ConsumeInbound method. Use a select on InboundChan() with context cancellation, matching the pattern used in the bus package tests. Co-Authored-By: Claude Opus 4.6 (1M context) --- pkg/channels/pico/client_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/channels/pico/client_test.go b/pkg/channels/pico/client_test.go index 8597469cf..118c9abea 100644 --- a/pkg/channels/pico/client_test.go +++ b/pkg/channels/pico/client_test.go @@ -189,13 +189,14 @@ func TestClientChannel_ReceivesServerMessage(t *testing.T) { // The echoed message.create is processed by handleServerMessage which // calls HandleMessage → PublishInbound. Consume it from the bus. - msg, ok := mb.ConsumeInbound(ctx) - if !ok { + select { + case msg := <-mb.InboundChan(): + if msg.Content != "ping" { + t.Fatalf("received = %q, want %q", msg.Content, "ping") + } + case <-ctx.Done(): t.Fatal("timed out waiting for echoed message") } - if msg.Content != "ping" { - t.Fatalf("received = %q, want %q", msg.Content, "ping") - } } func TestClientChannel_StartTyping(t *testing.T) {