From 7dffc9388adaf8dcb4b5626f40cacae88edefc74 Mon Sep 17 00:00:00 2001 From: kailixu Date: Sun, 29 Dec 2024 17:28:23 +0800 Subject: [PATCH] enh: robustness of test case --- tests/system-test/2-query/elapsed.py | 2 +- tests/system-test/2-query/statecount.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-test/2-query/elapsed.py b/tests/system-test/2-query/elapsed.py index dc89cd513d..c1191c3441 100644 --- a/tests/system-test/2-query/elapsed.py +++ b/tests/system-test/2-query/elapsed.py @@ -1542,7 +1542,7 @@ class TDTestCase: def query_precision(self): def generate_data(precision="ms"): - tdSql.execute("create database if not exists db_%s precision '%s';" %(precision, precision)) + tdSql.execute("create database if not exists db_%s keep 36500 precision '%s';" %(precision, precision)) tdSql.execute("use db_%s;" %precision) tdSql.execute("create stable db_%s.st (ts timestamp , id int) tags(ind int);"%precision) tdSql.execute("create table db_%s.tb1 using st tags(1);"%precision) diff --git a/tests/system-test/2-query/statecount.py b/tests/system-test/2-query/statecount.py index 006215956b..f5dba2df4f 100644 --- a/tests/system-test/2-query/statecount.py +++ b/tests/system-test/2-query/statecount.py @@ -395,7 +395,7 @@ class TDTestCase: def query_precision(self): def generate_data(precision="ms"): dbname = f"db_{precision}" - tdSql.execute(f"create database if not exists db_%s precision '%s';" %(precision, precision)) + tdSql.execute(f"create database if not exists db_%s keep 36500 precision '%s';" %(precision, precision)) tdSql.execute("use db_%s;" %precision) tdSql.execute(f"create stable db_%s.st (ts timestamp , id int) tags(ind int);"%precision) tdSql.execute(f"create table db_%s.tb1 using {dbname}.st tags(1);"%precision) @@ -449,7 +449,7 @@ class TDTestCase: def check_boundary_values(self, dbname="bound_test"): tdSql.execute(f"drop database if exists {dbname}") - tdSql.execute(f"create database if not exists {dbname}") + tdSql.execute(f"create database if not exists {dbname} keep 36500") tdSql.execute( f"create table {dbname}.stb_bound (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(32),c9 nchar(32), c10 timestamp) tags (t1 int);" )