diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 89fc1c26212960490298ba762e4b568438ef2a2a..a598e5eec953e5952d1fb3bdd9bbc77995d68dfa 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -402,10 +402,12 @@ static void tscSetNextLaunchTimer(SSqlStream *pStream, SSqlObj *pSql) { taos_close_stream(pStream); return; } - - timer = pStream->stime - taosGetTimestamp(pStream->precision); - if (timer < 0) { - timer = 0; + + if (pStream->stime > 0) { + timer = pStream->stime - taosGetTimestamp(pStream->precision); + if (timer < 0) { + timer = 0; + } } } diff --git a/tests/pytest/stream/sys.py b/tests/pytest/stream/sys.py index a73e7043e8c65b2eb9c78fbcb99d4e546ddf9ae4..c9a3fccfe68b61da722dcdb2ccab63bf3d5bcabc 100644 --- a/tests/pytest/stream/sys.py +++ b/tests/pytest/stream/sys.py @@ -47,7 +47,7 @@ class TDTestCase: "select * from iostrm", ] for sql in sqls: - (rows, _) = tdSql.waitedQuery(sql, 1, 120) + (rows, _) = tdSql.waitedQuery(sql, 1, 240) if rows < 1: tdLog.exit("failed: sql:%s, expect at least one row" % sql)