From d9e7e06482a40a9d755ab2d2c9d902c34e07948d Mon Sep 17 00:00:00 2001 From: Shikong <919411476@qq.com> Date: Fri, 24 Mar 2023 16:17:50 +0800 Subject: [PATCH] =?UTF-8?q?dnslog=20=E7=AE=80=E5=8D=95=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../matrix-dnslog-service/internal/lookup_test.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/golang/matrix-dnslog-service/internal/lookup_test.go b/backend/golang/matrix-dnslog-service/internal/lookup_test.go index 0153706..8ecb348 100644 --- a/backend/golang/matrix-dnslog-service/internal/lookup_test.go +++ b/backend/golang/matrix-dnslog-service/internal/lookup_test.go @@ -4,17 +4,24 @@ import ( "encoding/hex" gonanoid "github.com/matoous/go-nanoid" "matrix-common/pkg/logger" + "time" "fmt" "math" "net" - "strings" "testing" ) +func TestBatchLookup(t *testing.T) { + for i := 0; i < 10; i++ { + TestLookup(t) + time.Sleep(1 * time.Second) + } +} + func TestLookup(t *testing.T) { id, _ := gonanoid.Generate("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 6) - originalText := strings.Repeat("1234567890", 66) + originalText := time.Now().Format("2006-01-02 15:04:05.000") text := hex.EncodeToString([]byte(originalText))