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 {