From 4d5a6dc971cdd1e799b8cf311b2a8961d457424c Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 29 Dec 2020 10:20:10 +0800 Subject: [PATCH 1/3] [TD-2596]clean python sql --- Jenkinsfile | 2 ++ tests/Jenkinsfile | 1 + 2 files changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index ef26773534..b46c68e2b9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -87,6 +87,7 @@ pipeline { pre_test() sh ''' cd ${WKC}/tests + find pytest -name '*'sql|xargs rm -rf ./test-all.sh p1 date''' } @@ -98,6 +99,7 @@ pipeline { pre_test() sh ''' cd ${WKC}/tests + find pytest -name '*'sql|xargs rm -rf ./test-all.sh p2 date''' } diff --git a/tests/Jenkinsfile b/tests/Jenkinsfile index e7d8a0b70f..09547710c6 100644 --- a/tests/Jenkinsfile +++ b/tests/Jenkinsfile @@ -42,6 +42,7 @@ pipeline { pre_test() sh ''' cd ${WKC}/tests + find pytest -name '*'sql|xargs rm -rf ./test-all.sh pytest date''' } From 3d207a7d03bcb88a5538f07be0f20847a8342ea4 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 29 Dec 2020 11:29:38 +0800 Subject: [PATCH 2/3] [TD-2558]add test case for twa --- tests/pytest/functions/function_twa_test2.py | 13 +++++++++++++ tests/pytest/pytest_1.sh | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/pytest/functions/function_twa_test2.py b/tests/pytest/functions/function_twa_test2.py index 1ffaa3c628..2a09ae3fc3 100644 --- a/tests/pytest/functions/function_twa_test2.py +++ b/tests/pytest/functions/function_twa_test2.py @@ -120,6 +120,19 @@ class TDTestCase: tdSql.checkData(2, 1, -1.5) tdSql.checkData(3, 1, -2) + #TD-2533 twa+interval with large records + tdSql.execute("create table t4(ts timestamp, c int)") + sql = 'insert into t4 values ' + for i in range(20000): + sql = sql + '(%d, %d)' % (self.ts + i * 500, i + 1) + if i % 2000 == 0: + tdSql.execute(sql) + sql = 'insert into t4 values ' + tdSql.execute(sql) + tdSql.query('select twa(c) from t4 interval(10s)') + tdSql.checkData(0,1,10.999) + + def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__) diff --git a/tests/pytest/pytest_1.sh b/tests/pytest/pytest_1.sh index 645d89899e..b4860344d8 100755 --- a/tests/pytest/pytest_1.sh +++ b/tests/pytest/pytest_1.sh @@ -231,6 +231,6 @@ python3 test.py -f tools/taosdemoTest2.py # subscribe python3 test.py -f subscribe/singlemeter.py -#python3 test.py -f subscribe/stability.py +#python3 test.py -f subscribe/stability.py python3 test.py -f subscribe/supertable.py From 2c0b4c2a575411bbe604c85eb122d91cfc05eae8 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 29 Dec 2020 11:37:14 +0800 Subject: [PATCH 3/3] update --- tests/pytest/pytest_1.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/pytest/pytest_1.sh b/tests/pytest/pytest_1.sh index bb7dc8a3e3..79815cb6c6 100755 --- a/tests/pytest/pytest_1.sh +++ b/tests/pytest/pytest_1.sh @@ -230,13 +230,7 @@ python3 test.py -f tools/lowaTest.py python3 test.py -f tools/taosdemoTest2.py # subscribe -<<<<<<< HEAD python3 test.py -f subscribe/singlemeter.py -#python3 test.py -f subscribe/stability.py +#python3 test.py -f subscribe/stability.py python3 test.py -f subscribe/supertable.py -======= -#python3 test.py -f subscribe/singlemeter.py -#python3 test.py -f subscribe/stability.py -#python3 test.py -f subscribe/supertable.py ->>>>>>> develop