From 0a45bdb2a27efc525164f2a99eae8f0b974ecba1 Mon Sep 17 00:00:00 2001 From: zhiyong Date: Tue, 2 Jul 2024 09:23:16 +0800 Subject: [PATCH] add ts_5054 ci case --- tests/army/query/fill/fill_null.py | 36 ++++++++++++++++++++++++++++++ tests/parallel_test/cases.task | 1 + 2 files changed, 37 insertions(+) create mode 100644 tests/army/query/fill/fill_null.py diff --git a/tests/army/query/fill/fill_null.py b/tests/army/query/fill/fill_null.py new file mode 100644 index 0000000000..cc299fb4d3 --- /dev/null +++ b/tests/army/query/fill/fill_null.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +import frame.etool + +from frame.log import * +from frame.cases import * +from frame.sql import * +from frame.caseBase import * +from frame import * + + +class TDTestCase(TBase): + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + self.dbname = "ts_5054" + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + def run(self): + etool.benchMark(command=f"-d {self.dbname} -t 1 -n 1000 -S 10 -y") + tdSql.execute(f"use {self.dbname}") + tdSql.execute("select database();") + tdSql.query( + "select _wstart, first(ts), last(ts) from meters where ts >= '2017-07-14 10:40:00.000' and ts < '2017-07-14 10:40:10.000' partition by groupid interval(3s) fill(NULL);" + ) + tdSql.checkRows(4) + tdSql.checkData(0, 1, "2017-07-14 10:40:00.000") + tdSql.checkData(0, 2, "2017-07-14 10:40:02.990") + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 533923ec73..750736731e 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -19,6 +19,7 @@ ,,y,army,./pytest.sh python3 ./test.py -f query/test_compare.py ,,y,army,./pytest.sh python3 ./test.py -f insert/test_column_tag_boundary.py ,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_desc.py -N 3 -L 3 -D 2 +,,y,army,./pytest.sh python3 ./test.py -f query/fill/fill_null.py ,,y,army,./pytest.sh python3 ./test.py -f cluster/incSnapshot.py -N 3 ,,y,army,./pytest.sh python3 ./test.py -f query/query_basic.py -N 3 ,,y,army,./pytest.sh python3 ./test.py -f query/accuracy/test_query_accuracy.py