All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
18 lines
388 B
Go
18 lines
388 B
Go
package queue
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func TestEnqueueTaskRejectsPreSerializedBytesBeforeQueueAccess(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
client := &Client{logger: zap.NewNop()}
|
|
if err := client.EnqueueTask(context.Background(), "test:bytes", []byte(`{"task_id":1}`)); err == nil {
|
|
t.Fatal("预序列化 []byte 载荷必须在访问 Asynq 前被拒绝")
|
|
}
|
|
}
|