From ff7b03c5dae7b66eccb0ce9cbfe48ea6835d5d3c Mon Sep 17 00:00:00 2001 From: dexter Date: Mon, 14 Apr 2025 21:41:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95):=20=E4=BF=AE=E6=AD=A3Te?= =?UTF-8?q?stStreamData=E4=B8=AD=E7=9A=84=E7=BB=93=E6=9E=9C=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- streamsql_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streamsql_test.go b/streamsql_test.go index 6e6289c..f28d9aa 100644 --- a/streamsql_test.go +++ b/streamsql_test.go @@ -30,6 +30,7 @@ func TestStreamData(t *testing.T) { defer cancel() // 添加测试数据 go func() { + defer wg.Done() ticker := time.NewTicker(1 * time.Second) defer ticker.Stop() for { @@ -81,7 +82,7 @@ func TestStreamData(t *testing.T) { wg.Wait() // 验证是否收到了结果 - assert.Greater(t, resultCount, 5, "应该至少收到一个结果") + assert.Equal(t, resultCount, 5, "应该至少收到一个结果") } func TestStreamsql(t *testing.T) { streamsql := New()