refactor: 优化时间触发逻辑

This commit is contained in:
dexter
2025-04-11 07:19:19 +08:00
parent b9b38565a0
commit a6b8e95f2f
6 changed files with 107 additions and 87 deletions
+1 -3
View File
@@ -31,10 +31,8 @@ func TestStreamsql(t *testing.T) {
strm.AddSink(func(result interface{}) {
resultChan <- result
})
// 等待 3 秒触发窗口
time.Sleep(3 * time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
var actual interface{}