From f655045cdf926db9e4799be0157a1a6288a2022a Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 7 Apr 2022 21:35:35 +0800 Subject: [PATCH] [TD-14540]: taosdump code cleanup for2.4 (#11299) * [TD-14540]: taosdump code cleanup for 2.4 * update taos-tools for 2.4 * refine 5-taos-tools/taosdump/taosdumpTestInspect.py --- src/kit/taos-tools | 2 +- .../taosdump/taosdumpTestInspect.py | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/kit/taos-tools b/src/kit/taos-tools index da06f99e10..3a1a45a2b1 160000 --- a/src/kit/taos-tools +++ b/src/kit/taos-tools @@ -1 +1 @@ -Subproject commit da06f99e10224d39079232e9605e92cbcd1cecb3 +Subproject commit 3a1a45a2b17be3305d1561d8f79e7a9fb42be8f4 diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py index a3c7cf8691..3caa10b76f 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestInspect.py @@ -59,15 +59,15 @@ class TDTestCase: tdSql.execute("use db") tdSql.execute( - "create table st(ts timestamp, c1 INT) tags(ntag INT)") - tdSql.execute("create table t1 using st tags(1)") - tdSql.execute("insert into t1 values(1640000000000, 1)") - tdSql.execute("create table t2 using st tags(2147483647)") - tdSql.execute("insert into t2 values(1640000000000, 2147483647)") - tdSql.execute("create table t3 using st tags(-2147483647)") - tdSql.execute("insert into t3 values(1640000000000, -2147483647)") - tdSql.execute("create table t4 using st tags(NULL)") - tdSql.execute("insert into t4 values(1640000000000, NULL)") + "create table st(ts timestamp, c1 INT, c2 BOOL, c3 TINYINT, c4 SMALLINT, c5 BIGINT, c6 FLOAT, c7 DOUBLE, c8 TIMESTAMP, c9 BINARY(10), c10 NCHAR(10), c11 TINYINT UNSIGNED, c12 SMALLINT UNSIGNED, c13 INT UNSIGNED, c14 BIGINT UNSIGNED) tags(n1 INT, w2 BOOL, t3 TINYINT, t4 SMALLINT, t5 BIGINT, t6 FLOAT, t7 DOUBLE, t8 TIMESTAMP, t9 BINARY(10), t10 NCHAR(10), t11 TINYINT UNSIGNED, t12 SMALLINT UNSIGNED, t13 INT UNSIGNED, t14 BIGINT UNSIGNED)") + tdSql.execute( + "create table t1 using st tags(1, true, 1, 1, 1, 1.0, 1.0, 1, '1', '一', 1, 1, 1, 1)") + tdSql.execute( + "insert into t1 values(1640000000000, 1, true, 1, 1, 1, 1.0, 1.0, 1, '1', '一', 1, 1, 1, 1)") + tdSql.execute( + "create table t2 using st tags(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)") + tdSql.execute( + "insert into t2 values(1640000000000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)") # sys.exit(1) @@ -96,10 +96,10 @@ class TDTestCase: taosdumpInspectCmd, shell=True).decode("utf-8") print("schema found times: %d" % int(schemaTimes)) - if (int(schemaTimes) != 5): + if (int(schemaTimes) != 3): caller = inspect.getframeinfo(inspect.stack()[0][0]) tdLog.exit( - "%s(%d) failed: expected schema found times 5, actual %d" % + "%s(%d) failed: expected schema found times 3, actual %d" % (caller.filename, caller.lineno, int(schemaTimes))) taosdumpInspectCmd = "%s -I %s/*.avro* | grep '=== Records:'|wc -l" % ( @@ -108,10 +108,10 @@ class TDTestCase: taosdumpInspectCmd, shell=True).decode("utf-8") print("records found times: %d" % int(recordsTimes)) - if (int(recordsTimes) != 5): + if (int(recordsTimes) != 3): caller = inspect.getframeinfo(inspect.stack()[0][0]) tdLog.exit( - "%s(%d) failed: expected records found times 5, actual %d" % + "%s(%d) failed: expected records found times 3, actual %d" % (caller.filename, caller.lineno, int(recordsTimes))) def stop(self): -- GitLab