From 61a899cfbce25ed07eac7f0e652069b5c550e3f3 Mon Sep 17 00:00:00 2001 From: Liu Yuan Date: Wed, 18 Mar 2026 01:37:07 +0800 Subject: [PATCH] fix(cron): update test to use OutboundChan instead of removed SubscribeOutbound The SubscribeOutbound method was removed in commit 9c31b0c but cron_test.go was not updated to use the new OutboundChan() API. --- pkg/tools/cron_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/tools/cron_test.go b/pkg/tools/cron_test.go index 09d29b6fa..cd7d39860 100644 --- a/pkg/tools/cron_test.go +++ b/pkg/tools/cron_test.go @@ -226,9 +226,12 @@ func TestCronTool_ExecuteJobPublishesErrorWhenExecDisabled(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - msg, ok := tool.msgBus.SubscribeOutbound(ctx) - if !ok { - t.Fatal("expected outbound message") + var msg bus.OutboundMessage + select { + case msg = <-tool.msgBus.OutboundChan(): + // got message + case <-ctx.Done(): + t.Fatal("timeout waiting for outbound message") } if !strings.Contains(msg.Content, "command execution is disabled") { t.Fatalf("expected exec disabled message, got: %s", msg.Content)