From ba25cc46acdf83a7b03193a69b53c8aa8d41d645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Thu, 27 Mar 2025 20:43:20 +0800 Subject: [PATCH] mq test --- internal/data/mq_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/data/mq_test.go b/internal/data/mq_test.go index ce448b5..8b4af8b 100644 --- a/internal/data/mq_test.go +++ b/internal/data/mq_test.go @@ -45,8 +45,8 @@ func Test_OrderProducer(t *testing.T) { func Test_NotifyProducer(t *testing.T) { m := make(map[string]*conf.EventMap) - m["notify"] = &conf.EventMap{ - Topic: "voucher_order_notify", + m["notifyRetry"] = &conf.EventMap{ + Topic: "voucher_order_notifyRetry", } c := &conf.RocketMQ{ @@ -64,11 +64,12 @@ func Test_NotifyProducer(t *testing.T) { } ctx := context.Background() - shardingKey := "752893584043413505_752893587050733569" + shardingKey := "3" - eventMap := c.EventMap["notify"] + eventMap := c.EventMap["notifyRetry"] sendOption := []mq.SendOption{ mq.WithSendShardingKeysOption(shardingKey), + mq.WithSendDelayLevelOption(0), } if err = mqx.SendSync(ctx, eventMap.Topic, []byte("{}"), sendOption...); err != nil {