diff --git a/documentation20/cn/08.connector/docs.md b/documentation20/cn/08.connector/docs.md index 8ab9c6703f6aec0fda9f9cf5720d39b4fe90ff69..9203c2cc9e24a8aaa424bb9e2ee64bd23310cc99 100644 --- a/documentation20/cn/08.connector/docs.md +++ b/documentation20/cn/08.connector/docs.md @@ -145,7 +145,7 @@ taos> | **CPU类型** | x64(64bit) | | | ARM64 | ARM32 | | ------------ | ------------ | -------- | -------- | -------- | ---------- | | **OS类型** | Linux | Win64 | Win32 | Linux | Linux | -| **支持与否** | **支持** | **支持** | **支持** | **支持** | **开发中** | +| **支持与否** | **支持** | **支持** | **支持** | **支持** | **支持** | C/C++的API类似于MySQL的C API。应用程序使用时,需要包含TDengine头文件 *taos.h*,里面列出了提供的API的函数原型。安装后,taos.h位于: diff --git a/documentation20/en/08.connector/docs.md b/documentation20/en/08.connector/docs.md index da3c455a6dc83f7ee513f23a25793c31ee6c11b0..e937ea8fde3f889b2c47fbc30aa40710764c8b69 100644 --- a/documentation20/en/08.connector/docs.md +++ b/documentation20/en/08.connector/docs.md @@ -154,7 +154,7 @@ Under cmd, enter the c:\TDengine directory and directly execute taos.exe, and yo | **CPU Type** | **x64****(****64bit****)** | | | **ARM64** | **ARM32** | | -------------------- | ---------------------------- | ------- | ------- | --------- | ------------------ | | **OS Type** | Linux | Win64 | Win32 | Linux | Linux | -| **Supported or Not** | Yes | **Yes** | **Yes** | **Yes** | **In development** | +| **Supported or Not** | Yes | **Yes** | **Yes** | **Yes** | **Yes** | The C/C++ API is similar to MySQL's C API. When application use it, it needs to include the TDengine header file taos.h (after installed, it is located in/usr/local/taos/include): diff --git a/src/kit/taos-tools b/src/kit/taos-tools index 26f90b549f6e113ef3d275775062e674b0119645..446c03da6df8fe6675c6aba14b1d0766b56e1f08 160000 --- a/src/kit/taos-tools +++ b/src/kit/taos-tools @@ -1 +1 @@ -Subproject commit 26f90b549f6e113ef3d275775062e674b0119645 +Subproject commit 446c03da6df8fe6675c6aba14b1d0766b56e1f08 diff --git a/tests/develop-test/fulltest.sh b/tests/develop-test/fulltest.sh index 832088b2ed6454cfef879c63448798dc02dedec5..e71a25659b1e5a2eed92e615f63eb18ace64de92 100755 --- a/tests/develop-test/fulltest.sh +++ b/tests/develop-test/fulltest.sh @@ -1 +1 @@ -python3 test.py -f insert/basic.py \ No newline at end of file +python3 test.py -f 1-insert/0-sql/basic.py \ No newline at end of file diff --git a/tests/pytest/alter/alter_cacheLastRow.py b/tests/pytest/alter/alter_cacheLastRow.py index 36a2864d0f91cf485505ee105870a98df71c4df8..1112a6a99a71d25b1bf146d7f6eea13104787121 100644 --- a/tests/pytest/alter/alter_cacheLastRow.py +++ b/tests/pytest/alter/alter_cacheLastRow.py @@ -52,7 +52,7 @@ class TDTestCase: #write 5M rows into db, then restart to force the data move into disk. #create 500 tables - os.system("%staosdemo -f tools/taosdemoAllTest/insert_5M_rows.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert_5M_rows.json -y " % binPath) tdDnodes.stop(1) tdDnodes.start(1) tdSql.execute('use db') diff --git a/tests/pytest/client/change_time_1_1.py b/tests/pytest/client/change_time_1_1.py index acdea17fbf1d093cef522d9a99ec17f80b9a4d3b..c66871119b582a133b32f2f57c8c4d95723c5734 100644 --- a/tests/pytest/client/change_time_1_1.py +++ b/tests/pytest/client/change_time_1_1.py @@ -42,7 +42,7 @@ class TDTestCase: #11 data files should be generated #vnode at TDinternal/community/sim/dnode1/data/vnode try: - os.system(f"{binPath}taosdemo -f tools/taosdemoAllTest/manual_change_time_1_1_A.json") + os.system(f"{binPath}taosBenchmark -f tools/taosdemoAllTest/manual_change_time_1_1_A.json") commandArray = ['ls', '-l', f'{TDenginePath}/sim/dnode1/data/vnode/vnode2/tsdb/data'] result = subprocess.run(commandArray, stdout=subprocess.PIPE).stdout.decode('utf-8') except BaseException: @@ -59,7 +59,7 @@ class TDTestCase: #leaving 7 data files. try: os.system ('timedatectl set-time 2020-10-25') - os.system(f"{binPath}taosdemo -f tools/taosdemoAllTest/manual_change_time_1_1_B.json") + os.system(f"{binPath}taosBenchmark -f tools/taosdemoAllTest/manual_change_time_1_1_B.json") except BaseException: os.system('sudo timedatectl set-ntp on') tdLog.sleep(10) diff --git a/tests/pytest/client/change_time_1_2.py b/tests/pytest/client/change_time_1_2.py index ec483b00be34ad52c2b22f77ed8d81fdfc43c068..58fca4e4356b4e198bbb23cabb3fc5072ec003d8 100644 --- a/tests/pytest/client/change_time_1_2.py +++ b/tests/pytest/client/change_time_1_2.py @@ -41,7 +41,7 @@ class TDTestCase: #11 data files should be generated #vnode at TDinternal/community/sim/dnode1/data/vnode try: - os.system(f"{binPath}taosdemo -f tools/taosdemoAllTest/manual_change_time_1_1_A.json") + os.system(f"{binPath}taosBenchmark -f tools/taosdemoAllTest/manual_change_time_1_1_A.json") commandArray = ['ls', '-l', f'{TDenginePath}/sim/dnode1/data/vnode/vnode2/tsdb/data'] result = subprocess.run(commandArray, stdout=subprocess.PIPE).stdout.decode('utf-8') except BaseException: diff --git a/tests/pytest/cluster/TD-3693/multClient.py b/tests/pytest/cluster/TD-3693/multClient.py index 24c27d9de9ff383f412af33e8d5f8318d1032f63..6eae7310fae902f0bb1114e60ef86e6d11370e8b 100644 --- a/tests/pytest/cluster/TD-3693/multClient.py +++ b/tests/pytest/cluster/TD-3693/multClient.py @@ -51,9 +51,9 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # insert data to cluster'db - os.system("%staosdemo -f cluster/TD-3693/insert1Data.json -y " % binPath) + os.system("%staosBenchmark -f cluster/TD-3693/insert1Data.json -y " % binPath) # multiple new and cloes connection with query data - os.system("%staosdemo -f cluster/TD-3693/insert2Data.json -y " % binPath) + os.system("%staosBenchmark -f cluster/TD-3693/insert2Data.json -y " % binPath) os.system("nohup %staosdemoMul -f cluster/TD-3693/queryCount.json -y & " % binPath) diff --git a/tests/pytest/compress/compressChangeVersion.py b/tests/pytest/compress/compressChangeVersion.py index b7b9ebe6b35dc4729e0dcae705ac7d93c73010e7..ad1c50149bdc0ffa5db8be4d9c4cc191b021e250 100644 --- a/tests/pytest/compress/compressChangeVersion.py +++ b/tests/pytest/compress/compressChangeVersion.py @@ -66,7 +66,7 @@ class TwoClients: # create backgroud db and tb tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f compress/insertDataDb1.json -y " % binPath) + os.system("%staosBenchmark -f compress/insertDataDb1.json -y " % binPath) # create foreground db and tb tdSql.execute("drop database if exists foredb") tdSql.execute("create database foredb") diff --git a/tests/pytest/dockerCluster/taosdemoWrapper.py b/tests/pytest/dockerCluster/taosdemoWrapper.py index 457dd4ee5aa5919951adbcea834d34cd367d3080..f2bd7bbc2307e2676a083c77f573609720c52450 100644 --- a/tests/pytest/dockerCluster/taosdemoWrapper.py +++ b/tests/pytest/dockerCluster/taosdemoWrapper.py @@ -35,11 +35,11 @@ class taosdemoWrapper: def run(self): if self.metadata is None: - os.system("taosdemo -h %s -d %s -t %d -T %d -c %s -a %d -b %s -n %d -t %d -O %d -R %d -w %d -x -y" + os.system("%staosBenchmark -h %s -d %s -t %d -T %d -c %s -a %d -b %s -n %d -t %d -O %d -R %d -w %d -x -y" % (self.host, self.database, self.tables, self.threads, self.configDir, self.replica, self.columnType, self.rowsPerTable, self.disorderRatio, self.disorderRange, self.charTypeLen)) else: - os.system("taosdemo -f %s" % self.metadata) + os.system("%staosBenchmark -f %s" % self.metadata) parser = argparse.ArgumentParser() diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index 36989ff1cb268d312b92cdf892b50a653b290fe0..f6cd615998a4c306f6626c1d49f03df2aeaa5f00 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -29,6 +29,7 @@ python3 ./test.py -f insert/in_function.py python3 ./test.py -f insert/modify_column.py #python3 ./test.py -f insert/line_insert.py python3 ./test.py -f insert/specialSql.py +python3 ./test.py -f insert/timestamp.py # timezone @@ -50,7 +51,7 @@ python3 ./test.py -f table/create_db_from_normal_db.py #stable python3 ./test.py -f stable/insert.py -python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py +#python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py # tag python3 ./test.py -f tag_lite/filter.py @@ -165,13 +166,13 @@ python3 ./test.py -f update/merge_commit_data.py python3 test.py -f tools/taosdumpTest.py python3 test.py -f tools/taosdumpTest2.py -python3 test.py -f tools/taosdemoTest.py -python3 test.py -f tools/taosdemoTestWithoutMetric.py -python3 test.py -f tools/taosdemoTestWithJson.py -python3 test.py -f tools/taosdemoTestLimitOffset.py -python3 test.py -f tools/taosdemoTestTblAlt.py -python3 test.py -f tools/taosdemoTestSampleData.py -python3 test.py -f tools/taosdemoTestInterlace.py +#python3 test.py -f tools/taosdemoTest.py +#python3 test.py -f tools/taosdemoTestWithoutMetric.py +#python3 test.py -f tools/taosdemoTestWithJson.py +#python3 test.py -f tools/taosdemoTestLimitOffset.py +#python3 test.py -f tools/taosdemoTestTblAlt.py +#python3 test.py -f tools/taosdemoTestSampleData.py +#python3 test.py -f tools/taosdemoTestInterlace.py # python3 test.py -f tools/taosdemoTestQuery.py # restful test for python @@ -179,10 +180,10 @@ python3 test.py -f tools/taosdemoTestInterlace.py # python3 test.py -f restful/restful_bind_db2.py # nano support -python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py -python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py -python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py -python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py +# python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py +#python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py +#python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py +#python3 test.py -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py python3 test.py -f tools/taosdumpTestNanoSupport.py # @@ -216,12 +217,12 @@ python3 ./test.py -f stable/query_after_reset.py # perfbenchmark python3 ./test.py -f perfbenchmark/bug3433.py #python3 ./test.py -f perfbenchmark/bug3589.py -python3 ./test.py -f perfbenchmark/taosdemoInsert.py +#python3 ./test.py -f perfbenchmark/taosdemoInsert.py #taosdemo -python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py -python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py -python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py +#python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py +#python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py +#python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertAllType.py #query python3 test.py -f query/distinctOneColTb.py @@ -394,10 +395,10 @@ python3 ./test.py -f insert/insert_locking.py python3 ./test.py -f alter/alter_debugFlag.py python3 ./test.py -f query/queryBetweenAnd.py python3 ./test.py -f tag_lite/alter_tag.py -python3 test.py -f tools/taosdemoAllTest/TD-4985/query-limit-offset.py -python3 test.py -f tools/taosdemoAllTest/TD-5213/insert4096columns_not_use_taosdemo.py -python3 test.py -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py -python3 test.py -f tools/taosdemoAllTest/TD-10539/create_taosdemo.py +#python3 test.py -f tools/taosdemoAllTest/TD-4985/query-limit-offset.py +#python3 test.py -f tools/taosdemoAllTest/TD-5213/insert4096columns_not_use_taosdemo.py +#python3 test.py -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py +#python3 test.py -f tools/taosdemoAllTest/TD-10539/create_taosdemo.py python3 ./test.py -f tag_lite/drop_auto_create.py python3 test.py -f insert/insert_before_use_db.py python3 test.py -f alter/alter_keep.py @@ -420,7 +421,7 @@ python3 ./test.py -f insert/verifyMemToDiskCrash.py python3 ./test.py -f query/queryRegex.py -python3 ./test.py -f tools/taosdemoTestdatatype.py +#python3 ./test.py -f tools/taosdemoTestdatatype.py #python3 ./test.py -f insert/schemalessInsert.py #python3 ./test.py -f insert/openTsdbTelnetLinesInsert.py #python3 ./test.py -f insert/openTsdbJsonInsert.py diff --git a/tests/pytest/import_merge/import_update_0.py b/tests/pytest/import_merge/import_update_0.py index 66e0d7d14420251a227e5f0c2bacec219273d032..269f2e88bbb25c64ef512de9f21cea31196b5c75 100644 --- a/tests/pytest/import_merge/import_update_0.py +++ b/tests/pytest/import_merge/import_update_0.py @@ -1055,7 +1055,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath+ "/build/bin/" - os.system("%staosdemo -N -d taosdemo -t 100 -n 100 -l 1000 -y" % binPath) + os.system("%staosBenchmark -N -d taosdemo -t 100 -n 100 -l 1000 -y" % binPath) tdSql.execute('''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);''' %(self.ts - 200)) sql = '''select * from table_2 where ts = %d ;''' %(self.ts - 200) diff --git a/tests/pytest/import_merge/import_update_1.py b/tests/pytest/import_merge/import_update_1.py index 7edfd610c2e6eac6588ae78f81c939118845973d..ec204f0e38b7ef48c74105cd3174a379bb2f6df8 100644 --- a/tests/pytest/import_merge/import_update_1.py +++ b/tests/pytest/import_merge/import_update_1.py @@ -1055,7 +1055,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath+ "/build/bin/" - os.system("%staosdemo -N -d taosdemo -t 100 -n 100 -l 1000 -y" % binPath) + os.system("%staosBenchmark -N -d taosdemo -t 100 -n 100 -l 1000 -y" % binPath) tdSql.execute('''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);''' %(self.ts - 200)) sql = '''select * from table_2 where ts = %d ;''' %(self.ts - 200) diff --git a/tests/pytest/import_merge/import_update_2.py b/tests/pytest/import_merge/import_update_2.py index a0efe31ab25f68a898a124e0be22c369fedabf7f..5baeec674056ee98b18158bfff9e573808e31652 100644 --- a/tests/pytest/import_merge/import_update_2.py +++ b/tests/pytest/import_merge/import_update_2.py @@ -1181,7 +1181,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath+ "/build/bin/" - os.system("%staosdemo -N -d taosdemo -t 100 -n 100 -l 1000 -y" % binPath) + os.system("%staosBenchmark -N -d taosdemo -t 100 -n 100 -l 1000 -y" % binPath) tdLog.info("========== stable ==========") tdSql.execute('''insert into table_2 values( %d , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);''' %(self.ts - 200)) diff --git a/tests/pytest/insert/timestamp.py b/tests/pytest/insert/timestamp.py new file mode 100644 index 0000000000000000000000000000000000000000..4c9cf36f40e31a792b550a557937d25d968f4fe2 --- /dev/null +++ b/tests/pytest/insert/timestamp.py @@ -0,0 +1,81 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import sys + +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import * + + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + self.ts = 1607281690000 + + def run(self): + tdSql.prepare() + + # TS-806 + tdLog.info("test case for TS-806") + + # Case 1 + tdSql.execute("create table t1(ts timestamp, c1 int)") + tdSql.execute("insert into t1(c1, ts) values(1, %d)" % self.ts) + tdSql.query("select * from t1") + tdSql.checkRows(1) + + # Case 2 + tdSql.execute("insert into t1(c1, ts) values(2, %d)(3, %d)" % (self.ts + 1000, self.ts + 2000)) + tdSql.query("select * from t1") + tdSql.checkRows(3) + + # Case 3 + tdSql.execute("create table t2(ts timestamp, c1 timestamp)") + tdSql.execute(" insert into t2(c1, ts) values(%d, %d)" % (self.ts, self.ts + 5000)) + tdSql.query("select * from t2") + tdSql.checkRows(1) + + tdSql.execute(" insert into t2(c1, ts) values(%d, %d)(%d, %d)" % (self.ts, self.ts + 6000, self.ts + 3000, self.ts + 8000)) + tdSql.query("select * from t2") + tdSql.checkRows(3) + + # Case 4 + tdSql.execute("create table stb(ts timestamp, c1 int, c2 binary(20)) tags(tstag timestamp, t1 int)") + tdSql.execute("insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', %d, 1)" % self.ts) + tdSql.query("select * from stb") + tdSql.checkRows(1) + + # Case 5 + tdSql.execute("insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', now, 1) tb2(c1, ts) using stb tags(now + 2m, 1000) values(1, now - 1h)") + tdSql.query("select * from stb") + tdSql.checkRows(3) + + tdSql.execute(" insert into tb1(c2, ts, c1) using stb(t1, tstag) tags(1, now) values('test', now + 10s, 1) tb2(c1, ts) using stb(tstag) tags(now + 2m) values(1, now - 3h)(2, now - 2h)") + tdSql.query("select * from stb") + tdSql.checkRows(6) + + # Case 6 + tdSql.execute("create table stb2 (ts timestamp, c1 timestamp, c2 timestamp) tags(t1 timestamp, t2 timestamp)") + tdSql.execute(" insert into tb4(c1, c2, ts) using stb2(t2, t1) tags(now, now + 1h) values(now + 1s, now + 2s, now + 3s)(now -1s, now - 2s, now - 3s) tb5(c2, ts, c1) using stb2(t2) tags(now + 1h) values(now, now, now)") + tdSql.query("select * from stb2") + tdSql.checkRows(3) + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/manualTest/TD-5114/continueCreateDn.py b/tests/pytest/manualTest/TD-5114/continueCreateDn.py index 9494ee5f3685d3ddaeb1848a58878d63fa7a54b6..e1d6f5193a3c3045f669815d8b98516d64def6e1 100644 --- a/tests/pytest/manualTest/TD-5114/continueCreateDn.py +++ b/tests/pytest/manualTest/TD-5114/continueCreateDn.py @@ -44,7 +44,7 @@ class TwoClients: # insert data with c connector for i in range(10): - os.system("taosdemo -f manualTest/TD-5114/insertDataDb3Replica2.json -y ") + os.system("%staosBenchmark -f manualTest/TD-5114/insertDataDb3Replica2.json -y ") # # check data correct tdSql.execute("show databases") tdSql.execute("use db3") diff --git a/tests/pytest/manualTest/manual_alter_block.py b/tests/pytest/manualTest/manual_alter_block.py index ccd98b1421400a765d85a35cf3a0b13b15f35f8e..14663b79cb9f604c251682263ab1189bc9e9c2b9 100644 --- a/tests/pytest/manualTest/manual_alter_block.py +++ b/tests/pytest/manualTest/manual_alter_block.py @@ -55,7 +55,7 @@ class TDTestCase: tdSql.checkData(0,9,3) #run taosdemo to occupy all cache, need to manually check memory consumption - os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) input("please check memory usage for taosd. After checking, press enter") #alter cache block to 8, then check alter @@ -64,7 +64,7 @@ class TDTestCase: tdSql.checkData(0,9,8) #run taosdemo to occupy all cache, need to manually check memory consumption - os.system("%staosdemo -f tools/taosdemoAllTest/manual_block2.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/manual_block2.json" % binPath) input("please check memory usage for taosd. After checking, press enter") ##expected result the peak memory consumption should increase by around 80MB = 5 blocks of cache diff --git a/tests/pytest/manualTest/manual_alter_comp.py b/tests/pytest/manualTest/manual_alter_comp.py index 6c3e0fc29606caae32b981c662daaacbd31b15be..978279c29a64ee4f413a5eef79fb7a48e359fc3b 100644 --- a/tests/pytest/manualTest/manual_alter_comp.py +++ b/tests/pytest/manualTest/manual_alter_comp.py @@ -74,7 +74,7 @@ class TDTestCase: tdSql.query('show databases') tdSql.execute('alter database db blocks 3') # minimize the data in cache tdSql.checkData(0,14,2) - os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data/vnode") print('comp = 2') input("please check disk usage for taosd. After checking, press enter") @@ -91,7 +91,7 @@ class TDTestCase: tdSql.execute('alter database db comp 0') tdSql.query('show databases') tdSql.checkData(0,14,0) - os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data") print('comp = 0') input("please check disk usage for taosd. After checking, press enter") @@ -108,7 +108,7 @@ class TDTestCase: tdSql.execute('alter database db comp 1') tdSql.query('show databases') tdSql.checkData(0,14,1) - os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data") print('comp = 1') input("please check disk usage for taosd. After checking, press enter") diff --git a/tests/pytest/perfbenchmark/bug3433.py b/tests/pytest/perfbenchmark/bug3433.py index e4480df6b6753df88e3526930ac4bee087264d35..2f17e0bd3ada7ece5f8544033192758fd4747b52 100644 --- a/tests/pytest/perfbenchmark/bug3433.py +++ b/tests/pytest/perfbenchmark/bug3433.py @@ -211,7 +211,7 @@ class TDTestCase: tdLog.info(f"taosd found in {buildPath}") binPath = buildPath + "/build/bin/" - create_table_cmd = f"{binPath}taosdemo -f {filepath} > /dev/null 2>&1" + create_table_cmd = f"{binPath}taosBenchmark -f {filepath} > /dev/null 2>&1" _ = subprocess.check_output(create_table_cmd, shell=True).decode("utf-8") def droptmpfile(self): diff --git a/tests/pytest/perfbenchmark/bug3589.py b/tests/pytest/perfbenchmark/bug3589.py index c54ef8595d0bea1c4984b3f90e282f09659576c3..e01bb998d8b59fd06c65288c520b08d932ae8447 100644 --- a/tests/pytest/perfbenchmark/bug3589.py +++ b/tests/pytest/perfbenchmark/bug3589.py @@ -89,7 +89,7 @@ class TDTestCase: tdLog.info(f"taosd found in {buildPath}") binPath = buildPath + "/debug/build/bin/" - query_table_cmd = f"yes | {binPath}taosdemo -f {filepath}" + query_table_cmd = f"yes | {binPath}taosBenchmark -f {filepath}" _ = subprocess.check_output(query_table_cmd, shell=True).decode("utf-8") def checkqueryresult(self, expectrows): diff --git a/tests/pytest/query/nestedQuery/nestedQuery.py b/tests/pytest/query/nestedQuery/nestedQuery.py index 9260aced9a1d79649802917daad8f36ec9cf249e..89751bb7b808002b42e09d4a6bee2ef16e7ac775 100755 --- a/tests/pytest/query/nestedQuery/nestedQuery.py +++ b/tests/pytest/query/nestedQuery/nestedQuery.py @@ -2220,7 +2220,7 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # regualr-table - os.system("%staosdemo -N -d regular -t 2 -n 1000 -l 4095 -y" % binPath) + os.system("%staosBenchmark -N -d regular -t 2 -n 1000 -l 4095 -y" % binPath) tdSql.execute("use regular") tdSql.query("select * from d0;") tdSql.checkCols(4096) @@ -2281,7 +2281,7 @@ class TDTestCase: tdSql.checkRows(1000) #stable - os.system("%staosdemo -d super -t 2 -n 1000 -l 4093 -y" % binPath) + os.system("%staosBenchmark -d super -t 2 -n 1000 -l 4093 -y" % binPath) tdSql.execute("use super") tdSql.query("select * from meters;") tdSql.checkCols(4096) diff --git a/tests/pytest/query/nestedQuery/nestedQueryJson.py b/tests/pytest/query/nestedQuery/nestedQueryJson.py index 36a231a9165a15cb46cbc0c1d37152f90e54b03e..fa12713f3603e80329416ce2edf9f518d7f91cc3 100644 --- a/tests/pytest/query/nestedQuery/nestedQueryJson.py +++ b/tests/pytest/query/nestedQuery/nestedQueryJson.py @@ -49,7 +49,7 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # insert: create one or mutiple tables per sql and insert multiple rows per sql - os.system("%staosdemo -f query/nestedQuery/insertData.json -y " % binPath) + os.system("%staosBenchmark -f query/nestedQuery/insertData.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1000) diff --git a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py index b248eda6b0ce42d8cb681a74d5c807d0275e6e14..36221e4b7ff21b82ccf72451cfea8472952b622d 100644 --- a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py +++ b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestInsertTime_step.py @@ -51,7 +51,7 @@ class TDTestCase: # insert: create one or mutiple tables per sql and insert multiple rows per sql # check the params of taosdemo about time_step is nano - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertNanoDB.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertNanoDB.json -y " % binPath) tdSql.execute("use testdb1") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -68,7 +68,7 @@ class TDTestCase: tdSql.checkData(0, 0,"2021-07-01 00:00:00.000099000") # check the params of taosdemo about time_step is us - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertUSDB.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertUSDB.json -y " % binPath) tdSql.execute("use testdb2") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -85,7 +85,7 @@ class TDTestCase: tdSql.checkData(0, 0,"2021-07-01 00:00:00.099000") # check the params of taosdemo about time_step is ms - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertMSDB.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoInsertMSDB.json -y " % binPath) tdSql.execute("use testdb3") tdSql.query("show stables") tdSql.checkData(0, 4, 100) diff --git a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py index f069bb8f7030dbd8d4eec8c9c741d246f261671b..34acbb2c0112b56cee6a637b9e1fbd5ddb42ddf7 100644 --- a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py +++ b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoInsert.py @@ -53,7 +53,7 @@ class TDTestCase: # check stable stb0 os.system( - "%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y " % + "%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y " % binPath) tdSql.execute("use nsdb") tdSql.query("show stables") @@ -88,7 +88,7 @@ class TDTestCase: # check stable stb0 os.system( - "%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseNow.json -y " % + "%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseNow.json -y " % binPath) tdSql.execute("use nsdb2") @@ -108,7 +108,7 @@ class TDTestCase: # cols os.system( - "%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y " % + "%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y " % binPath) tdSql.execute("use nsdbcsv") tdSql.query("show stables") @@ -130,7 +130,7 @@ class TDTestCase: # taosdemo test insert with command and parameter , detals show # taosdemo --help os.system( - "%staosdemo -u root -ptaosdata -P 6030 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y " % + "%staosBenchmark -u root -ptaosdata -P 6030 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y " % binPath) tdSql.query("select count(*) from test.meters") tdSql.checkData(0, 0, 600) @@ -152,7 +152,7 @@ class TDTestCase: sleep(10) - os.system("%staosdemo -s taosdemoTestNanoCreateDB.sql -y " % binPath) + os.system("%staosBenchmark -s taosdemoTestNanoCreateDB.sql -y " % binPath) tdSql.query("select count(*) from nsdbsql.meters") tdSql.checkData(0, 0, 2) diff --git a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py index 6c3e4d6c8a0d72a4b468cca22b2b1a6a25659db5..137cbe724310260254591c874e7bc0362f1e7f2f 100644 --- a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py +++ b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.py @@ -1,4 +1,4 @@ -################################################################### +''################################################################### # Copyright (c) 2016 by TAOS Technologies, Inc. # All rights reserved. # @@ -49,7 +49,7 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # query: query test for nanoSecond with where and max min groupby order - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabase.json -y " % binPath) tdSql.execute("use nsdb") @@ -92,10 +92,10 @@ class TDTestCase: # query : query above sqls by taosdemo and continuously - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuery.json -y " % binPath) - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabasecsv.json -y " % binPath) tdSql.execute("use nsdbcsv") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -140,7 +140,7 @@ class TDTestCase: tdSql.checkRows(10) # query : query above sqls by taosdemo and continuously - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuerycsv.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoQuerycsv.json -y " % binPath) os.system("rm -rf ./query_res*.txt*") os.system("rm -rf tools/taosdemoAllTest/NanoTestCase/*.py.sql") diff --git a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py index 95c1a731bcde4c78d0aa272183bd2e7b7a4b168b..44a25801210c3bc8e74c576626ec974eb20dc70b 100644 --- a/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py +++ b/tests/pytest/tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanosubscribe.py @@ -73,8 +73,8 @@ class TDTestCase: # insert data - os.system("%staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseInsertForSub.json" % binPath) - os.system("nohup %staosdemo -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json &" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestNanoDatabaseInsertForSub.json" % binPath) + os.system("nohup %staosBenchmark -f tools/taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json &" % binPath) query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/NanoTestCase/taosdemoTestSupportNanoSubscribe.json" |grep -v "grep"|awk \'{print $2}\'')[1]) diff --git a/tests/pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py b/tests/pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py index 6e722d3243c4a69b921e7dbe17d38c7339c847e9..e498e74bf1fe72519676d6a329dab226d1e41ee4 100644 --- a/tests/pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py +++ b/tests/pytest/tools/taosdemoAllTest/TD-10539/create_taosdemo.py @@ -56,7 +56,7 @@ class TDTestCase: #print("==============taosdemo,#create stable,table; insert table; show table; select table; drop table") self.tsdemo = "tsdemo~!.@#$%^*[]-_=+{,?.}" #this escape character is not support in shell . include & () <> | / - os.system("%staosdemo -d test -E -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) + os.system("%staosBenchmark -d test -E -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) tdSql.execute("use test ;" ) tdSql.query("select count(*) from meters") tdSql.checkData(0, 0, 1000) @@ -91,14 +91,14 @@ class TDTestCase: tdSql.error("select * from test.`%s2` ; " %self.tsdemo) # Exception - os.system("%staosdemo -d test -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) + os.system("%staosBenchmark -d test -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) tdSql.query("show test.tables ") tdSql.checkRows(0) #print("==============taosdemo,#create regular table; insert table; show table; select table; drop table") self.tsdemo = "tsdemo~!.@#$%^*[]-_=+{,?.}" #this escape character is not support in shell . include & () <> | / - os.system("%staosdemo -N -E -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) + os.system("%staosBenchmark -N -E -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) tdSql.execute("use test ;" ) tdSql.query("select count(*) from `%s1`" %self.tsdemo) tdSql.checkData(0, 0, 100) @@ -125,13 +125,13 @@ class TDTestCase: tdSql.checkRows(9) # Exception - os.system("%staosdemo -N -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) + os.system("%staosBenchmark -N -m %s -t 10 -n 100 -l 10 -y " % (binPath,self.tsdemo)) tdSql.query("show test.tables ") tdSql.checkRows(0) #print("==============taosdemo——json_yes,#create stable,table; insert table; show table; select table; drop table") - os.system("%staosdemo -f tools/taosdemoAllTest/TD-10539/create_taosdemo_yes.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/TD-10539/create_taosdemo_yes.json -y " % binPath) tdSql.execute("use dbyes") self.tsdemo_stable = "tsdemo_stable~!.@#$%^*[]-_=+{,?.}" @@ -171,7 +171,7 @@ class TDTestCase: #print("==============taosdemo——json_no,#create stable,table; insert table; show table; select table; drop table") - os.system("%staosdemo -f tools/taosdemoAllTest/TD-10539/create_taosdemo_no.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/TD-10539/create_taosdemo_no.json -y " % binPath) tdSql.query("show dbno.tables;") tdSql.checkRows(0) diff --git a/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py b/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py index fe29409f296b310012773b9d78ca8735cfd52a13..e8e65b68b89c35f33e239b4121f4d99b84c796a0 100644 --- a/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py +++ b/tests/pytest/tools/taosdemoAllTest/TD-3453/query-interrupt.py @@ -52,13 +52,13 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # # insert 1000w rows in stb0 - os.system("%staosdemo -f tools/taosdemoAllTest/TD-3453/query-interrupt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/TD-3453/query-interrupt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0,60) tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 6000000) - os.system('%staosdemo -f tools/taosdemoAllTest/TD-3453/queryall.json -y & ' % binPath) + os.system('%staosBenchmark -f tools/taosdemoAllTest/TD-3453/queryall.json -y & ' % binPath) time.sleep(2) query_pid = int(subprocess.getstatusoutput('ps aux|grep "TD-3453/queryall.json" |grep -v "grep"|awk \'{print $2}\'')[1]) taosd_cpu_load_1 = float(subprocess.getstatusoutput('top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk \'{print $2}\')|awk \'END{print}\' |awk \'{print $9}\'')[1]) diff --git a/tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py b/tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py index f5e2d7ce08b4804d8c5ad9745e775f0fa1ebbc1b..987dd1bfa4771b505023bdeab78994ba488d671a 100644 --- a/tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py +++ b/tests/pytest/tools/taosdemoAllTest/TD-4985/query-limit-offset.py @@ -55,7 +55,7 @@ class TDTestCase: # insert: create one or mutiple tables per sql and insert multiple rows per sql # test case for https://jira.taosdata.com:18080/browse/TD-4985 os.system("rm -rf tools/taosdemoAllTest/TD-4985/query-limit-offset.py.sql") - os.system("%staosdemo -f tools/taosdemoAllTest/TD-4985/query-limit-offset.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/TD-4985/query-limit-offset.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10000) diff --git a/tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py b/tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py index eb844b6fe24338b0301c45b918967faec7debcc0..ce3f6ca4c2be3210cc84e8b3f13683b0dd268fa4 100755 --- a/tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py +++ b/tests/pytest/tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.py @@ -52,7 +52,7 @@ class TDTestCase: #-N:regular table -d:database name -t:table num -n:rows num per table -l:col num -y:force #regular old && new startTime = time.time() - os.system("%staosdemo -N -d regular_old -t 1 -n 10 -l 1023 -y" % binPath) + os.system("%staosBenchmark -N -d regular_old -t 1 -n 10 -l 1023 -y" % binPath) tdSql.execute("use regular_old") tdSql.query("show tables;") tdSql.checkRows(1) @@ -61,7 +61,7 @@ class TDTestCase: tdSql.query("describe d0;") tdSql.checkRows(1024) - os.system("%staosdemo -N -d regular_new -t 1 -n 10 -l 4095 -y" % binPath) + os.system("%staosBenchmark -N -d regular_new -t 1 -n 10 -l 4095 -y" % binPath) tdSql.execute("use regular_new") tdSql.query("show tables;") tdSql.checkRows(1) @@ -71,7 +71,7 @@ class TDTestCase: tdSql.checkRows(4096) #super table -d:database name -t:table num -n:rows num per table -l:col num -y:force - os.system("%staosdemo -d super_old -t 1 -n 10 -l 1021 -y" % binPath) + os.system("%staosBenchmark -d super_old -t 1 -n 10 -l 1021 -y" % binPath) tdSql.execute("use super_old") tdSql.query("show tables;") tdSql.checkRows(1) @@ -84,7 +84,7 @@ class TDTestCase: tdSql.query("describe d0;") tdSql.checkRows(1024) - os.system("%staosdemo -d super_new -t 1 -n 10 -l 4093 -y" % binPath) + os.system("%staosBenchmark -d super_new -t 1 -n 10 -l 4093 -y" % binPath) tdSql.execute("use super_new") tdSql.query("show tables;") tdSql.checkRows(1) @@ -104,7 +104,7 @@ class TDTestCase: # insert: create one or mutiple tables per sql and insert multiple rows per sql # test case for https://jira.taosdata.com:18080/browse/TD-5213 - os.system("%staosdemo -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/TD-5213/insertSigcolumnsNum4096.json -y " % binPath) tdSql.execute("use json") tdSql.query("select count (tbname) from stb_old") tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py b/tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py index 077ced5d02c792b1c3344ea3e8b129038652b4b8..955545ac2cb2578089b705e67a97d99678182154 100644 --- a/tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py +++ b/tests/pytest/tools/taosdemoAllTest/moredemo-insert-offset.py @@ -50,10 +50,10 @@ class TDTestCase: # insert: drop and child_table_exists combination test # insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset - os.system("%staosdemo -f tools/taosdemoAllTest/moredemo-offset-newdb.json" % binPath) - os.system("%staosdemo -f tools/taosdemoAllTest/moredemo-offset-limit1.json & " % binPath) - os.system("%staosdemo -f tools/taosdemoAllTest/moredemo-offset-limit94.json & " % binPath) - os.system("%staosdemo -f tools/taosdemoAllTest/moredemo-offset-limit5.json & " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/moredemo-offset-newdb.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/moredemo-offset-limit1.json & " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/moredemo-offset-limit94.json & " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/moredemo-offset-limit5.json & " % binPath) sleep(15) tdSql.execute("use db") tdSql.query("select count(*) from stb0") diff --git a/tests/pytest/tools/taosdemoAllTest/query-interrupt.py b/tests/pytest/tools/taosdemoAllTest/query-interrupt.py index 270bfd8b60f559c370eb921cf74fe4f7b82ae06e..df021cbe3be5da9a0a28b78bbafef548c24697fa 100644 --- a/tests/pytest/tools/taosdemoAllTest/query-interrupt.py +++ b/tests/pytest/tools/taosdemoAllTest/query-interrupt.py @@ -52,13 +52,13 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # # insert 1000w rows in stb0 - os.system("%staosdemo -f tools/taosdemoAllTest/query-interrupt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/query-interrupt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0,60) tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 6000000) - os.system('%staosdemo -f tools/taosdemoAllTest/queryall.json -y & ' % binPath) + os.system('%staosBenchmark -f tools/taosdemoAllTest/queryall.json -y & ' % binPath) time.sleep(2) query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/queryall.json" |grep -v "grep"|awk \'{print $2}\'')[1]) taosd_cpu_load_1 = float(subprocess.getstatusoutput('top -n 1 -b -p $(ps aux|grep "bin/taosd -c"|grep -v "grep" |awk \'{print $2}\')|awk \'END{print}\' |awk \'{print $9}\'')[1]) diff --git a/tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py b/tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py index 270eea17cb6c913719fb67c4b8f33065b0a0445d..e1a9f647fa2b5d1f561e50a06b9755d78bebfa79 100644 --- a/tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py +++ b/tests/pytest/tools/taosdemoAllTest/subscribeNoResult.py @@ -68,7 +68,7 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" - os.system("%staosdemo -f tools/taosdemoAllTest/sub_no_result.json -g 2>&1 | tee sub_no_result.log" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sub_no_result.json -g 2>&1 | tee sub_no_result.log" % binPath) test_line = int(self.execCmdAndGetOutput("cat sub_no_result.log | wc -l")) if(test_line < 1100024): tdLog.exit("failed test subscribeNoResult: %d != expected(1100024)" % test_line) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py index 1e5794dc6d41188a861c9960f0a3e06bc346a1da..3bb290fdd0550bbebd95ebd9c30ee34272808281 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertAllType.py @@ -49,7 +49,7 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # insert: create one or mutiple tables per sql and insert multiple rows per sql - os.system("%staosdemo -f tools/taosdemoAllTest/insert-allDataType.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-allDataType.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1000) @@ -65,7 +65,7 @@ class TDTestCase: tdSql.checkData(0, 0, 200000) # stmt interface - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-allDataType-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-allDataType-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1000) @@ -81,7 +81,7 @@ class TDTestCase: tdSql.checkData(0, 0, 200000) # taosdemo command line - os.system("%staosdemo -t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y " % binPath) + os.system("%staosBenchmark -t 1000 -n 100 -T 10 -b INT,TIMESTAMP,BIGINT,FLOAT,DOUBLE,SMALLINT,TINYINT,BOOL,NCHAR,UINT,UBIGINT,UTINYINT,USMALLINT,BINARY -y " % binPath) tdSql.execute("use test") tdSql.query("select count (tbname) from meters") tdSql.checkData(0, 0, 1000) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py index 7b3b865df91f87622737eede640ec79e880e433b..fd9ee695489dc5fb9d98480e0a81ec5abe275281 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertTime_step.py @@ -51,7 +51,7 @@ class TDTestCase: # insert: create one or mutiple tables per sql and insert multiple rows per sql # check the params of taosdemo about time_step is nano - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoInsertNanoDB.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/taosdemoInsertNanoDB.json -y " % binPath) tdSql.execute("use testdb1") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -68,7 +68,7 @@ class TDTestCase: tdSql.checkData(0, 0,"2021-07-01 00:00:00.000099000") # check the params of taosdemo about time_step is us - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoInsertUSDB.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/taosdemoInsertUSDB.json -y " % binPath) tdSql.execute("use testdb2") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -85,7 +85,7 @@ class TDTestCase: tdSql.checkData(0, 0,"2021-07-01 00:00:00.099000") # check the params of taosdemo about time_step is ms - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoInsertMSDB.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/taosdemoInsertMSDB.json -y " % binPath) tdSql.execute("use testdb3") tdSql.query("show stables") tdSql.checkData(0, 4, 100) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py index 1ab67e721774200f238b81c2fc6bd88564a0b3f6..2aaa5795866e03ab0bf4d3dbf6c0e431ebd604d3 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJson.py @@ -53,7 +53,7 @@ class TDTestCase: os.system("rm -rf tools/taosdemoAllTest/%s.sql" % testcaseFilename ) # insert: create one or mutiple tables per sql and insert multiple rows per sql - os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tnt1r.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-1s1tnt1r.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 11) @@ -69,7 +69,7 @@ class TDTestCase: tdSql.checkData(0, 0, 2000) # restful connector insert data - os.system("%staosdemo -f tools/taosdemoAllTest/insertRestful.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertRestful.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10) @@ -86,7 +86,7 @@ class TDTestCase: # default values json files tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insert-default.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-default.json -y " % binPath) tdSql.query("show databases;") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == 'db': @@ -96,7 +96,7 @@ class TDTestCase: tdSql.checkData(i, 16, 'ms') # insert: create mutiple tables per sql and insert one rows per sql . - os.system("%staosdemo -f tools/taosdemoAllTest/insert-1s1tntmr.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-1s1tntmr.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10) @@ -113,7 +113,7 @@ class TDTestCase: # insert: using parament "insert_interval to controls spped of insert. # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 - os.system("%staosdemo -f tools/taosdemoAllTest/insert-interval-speed.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-interval-speed.json -y" % binPath) tdSql.execute("use db") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -131,9 +131,9 @@ class TDTestCase: # spend 2min30s for 3 testcases. # insert: drop and child_table_exists combination test # insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset - os.system("%staosdemo -f tools/taosdemoAllTest/insert-nodbnodrop.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-nodbnodrop.json -y" % binPath) tdSql.error("show dbno.stables") - os.system("%staosdemo -f tools/taosdemoAllTest/insert-newdb.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-newdb.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 5) @@ -145,7 +145,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count (tbname) from stb4") tdSql.checkData(0, 0, 8) - os.system("%staosdemo -f tools/taosdemoAllTest/insert-offset.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-offset.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 50) @@ -157,7 +157,7 @@ class TDTestCase: tdSql.checkData(0, 0, 180) tdSql.query("select count(*) from stb4") tdSql.checkData(0, 0, 160) - os.system("%staosdemo -f tools/taosdemoAllTest/insert-newtable.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-newtable.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 150) @@ -169,7 +169,7 @@ class TDTestCase: tdSql.checkData(0, 0, 340) tdSql.query("select count(*) from stb4") tdSql.checkData(0, 0, 400) - os.system("%staosdemo -f tools/taosdemoAllTest/insert-renewdb.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-renewdb.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 50) @@ -185,30 +185,30 @@ class TDTestCase: # insert: let parament in json file is illegal, it'll expect error. tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertColumnsAndTagNumLarge4096.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertColumnsAndTagNumLarge4096.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertSigcolumnsNum4096.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertSigcolumnsNum4096.json -y " % binPath) tdSql.error("select * from db.stb0") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertColumnsAndTagNum4096.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertColumnsAndTagNum4096.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkData(0, 0, 10000) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertInterlaceRowsLarge1M.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertInterlaceRowsLarge1M.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkRows(0) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertColumnsNum0.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertColumnsNum0.json -y " % binPath) tdSql.execute("use db") tdSql.query("show stables like 'stb0%' ") tdSql.checkData(0, 2, 11) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertTagsNumLarge128.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertTagsNumLarge128.json -y " % binPath) tdSql.error("use db1") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar49151.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertBinaryLenLarge16374AllcolLar49151.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkRows(1) tdSql.query("select count(*) from db.stb1") @@ -218,19 +218,19 @@ class TDTestCase: tdSql.query("select count(*) from db.stb3") tdSql.checkRows(1) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertNumOfrecordPerReq0.json -y " % binPath) tdSql.error("select count(*) from db.stb0") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertNumOfrecordPerReqless0.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertChildTab0.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertChildTab0.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/insertChildTabLess0.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertChildTabLess0.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists blf") - os.system("%staosdemo -f tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertTimestepMulRowsLargeint16.json -y " % binPath) tdSql.execute("use blf") tdSql.query("select ts from blf.p_0_topics_7 limit 262800,1") tdSql.checkData(0, 0, "2020-03-31 12:00:00.000") @@ -238,7 +238,7 @@ class TDTestCase: tdSql.checkData(0, 0, "2019-10-01 00:00:00") tdSql.query("select last(ts) from blf.p_0_topics_6 ") tdSql.checkData(0, 0, "2020-09-29 23:59:00") - os.system("%staosdemo -f tools/taosdemoAllTest/insertMaxNumPerReq.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insertMaxNumPerReq.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 5000000) @@ -248,7 +248,7 @@ class TDTestCase: # insert: timestamp and step - os.system("%staosdemo -f tools/taosdemoAllTest/insert-timestep.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-timestep.json -y " % binPath) tdSql.execute("use db") tdSql.query("show stables") tdSql.query("select count (tbname) from stb0") @@ -265,7 +265,7 @@ class TDTestCase: tdSql.checkData(0, 0, 400) # # insert: disorder_ratio - os.system("%staosdemo -f tools/taosdemoAllTest/insert-disorder.json -g 2>&1 -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-disorder.json -g 2>&1 -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) @@ -277,7 +277,7 @@ class TDTestCase: tdSql.checkData(0, 0, 10) # insert: sample json - os.system("%staosdemo -f tools/taosdemoAllTest/insert-sample-ts.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-sample-ts.json -y " % binPath) tdSql.execute("use dbtest123") tdSql.query("select c2 from stb0") tdSql.checkData(0, 0, 2147483647) @@ -296,7 +296,7 @@ class TDTestCase: tdSql.checkRows(10) # insert: sample json - os.system("%staosdemo -f tools/taosdemoAllTest/insert-sample.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-sample.json -y " % binPath) tdSql.execute("use dbtest123") tdSql.query("select c2 from stb0") tdSql.checkData(0, 0, 2147483647) @@ -309,7 +309,7 @@ class TDTestCase: # insert: test interlace parament - os.system("%staosdemo -f tools/taosdemoAllTest/insert-interlace-row.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/insert-interlace-row.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 100) @@ -322,7 +322,7 @@ class TDTestCase: tdSql.execute('drop database if exists db') tdSql.execute('create database db') tdSql.execute('use db') - os.system("%staosdemo -y -f tools/taosdemoAllTest/insert-drop-exist-auto-N00.json " % binPath) # drop = no, child_table_exists, auto_create_table varies + os.system("%staosBenchmark -y -f tools/taosdemoAllTest/insert-drop-exist-auto-N00.json " % binPath) # drop = no, child_table_exists, auto_create_table varies tdSql.execute('use db') tdSql.query('show tables like \'NN123%\'') #child_table_exists = no, auto_create_table varies = 123 tdSql.checkRows(20) @@ -338,7 +338,7 @@ class TDTestCase: tdSql.checkRows(0) tdSql.execute('drop database if exists db') - os.system("%staosdemo -y -f tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies + os.system("%staosBenchmark -y -f tools/taosdemoAllTest/insert-drop-exist-auto-Y00.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies tdSql.execute('use db') tdSql.query('show tables like \'YN123%\'') #child_table_exists = no, auto_create_table varies = 123 tdSql.checkRows(20) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py index af5006bb2333bbc9d8fba4a93ebcab3f5bb13257..4c2baf5a11d3f5dff3a98664be11cac78ebb9c6b 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonSml.py @@ -50,7 +50,7 @@ class TDTestCase: # insert: create one or mutiple tables per sql and insert multiple rows per sql # line_protocol——telnet and json - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-1s1tnt1r-sml.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10) @@ -67,7 +67,7 @@ class TDTestCase: # insert: create mutiple tables per sql and insert one rows per sql . - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-1s1tntmr-sml.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10) @@ -84,7 +84,7 @@ class TDTestCase: # insert: using parament "insert_interval to controls spped of insert. # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interval-speed-sml.json -y" % binPath) tdSql.execute("use db") tdSql.query("select tbname from stb0") tdSql.checkRows(100 ) @@ -103,9 +103,9 @@ class TDTestCase: # insert: drop and child_table_exists combination test # insert: sml can't support parament "childtable_offset and childtable_limit" \ drop=no or child_table_exists = yes - # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-nodbnodrop-sml.json -y" % binPath) # tdSql.error("show dbno.stables") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-newdb-sml.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 5) @@ -117,7 +117,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count (tbname) from stb4") tdSql.checkData(0, 0, 8) - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-renewdb-sml.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 50) @@ -133,29 +133,29 @@ class TDTestCase: # insert: let parament in json file is illegal, it'll expect error. tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNumLarge4096-sml.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertSigcolumnsNum4096-sml.json -y " % binPath) tdSql.error("select * from db.stb0") # tdSql.execute("drop database if exists db") - # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsAndTagNum4096-sml.json -y " % binPath) # tdSql.query("select count(*) from db.stb0") # tdSql.checkData(0, 0, 10000) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertInterlaceRowsLarge1M-sml.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkRows(0) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertColumnsNum0-sml.json -y " % binPath) tdSql.execute("use db") tdSql.query("show stables like 'stb0%' ") tdSql.checkData(0, 2, 11) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertTagsNumLarge128-sml.json -y " % binPath) tdSql.error("use db1") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertBinaryLenLarge16374AllcolLar49151-sml.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkRows(1) tdSql.query("select count(*) from db.stb1") @@ -165,19 +165,19 @@ class TDTestCase: tdSql.query("select count(*) from db.stb3") tdSql.checkRows(1) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReq0-sml.json -y " % binPath) tdSql.error("select count(*) from db.stb0") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertNumOfrecordPerReqless0-sml.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertChildTab0-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertChildTab0-sml.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertChildTabLess0-sml.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists blf") - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertTimestepMulRowsLargeint16-sml.json -y " % binPath) tdSql.execute("use blf") tdSql.query("select ts from blf.p_0_topics_7 limit 262800,1") tdSql.checkData(0, 0, "2020-03-31 12:00:00.000") @@ -186,13 +186,13 @@ class TDTestCase: tdSql.query("select last(ts) from blf.p_0_topics_6 ") tdSql.checkData(0, 0, "2020-09-29 23:59:00") # it will be commented in ci because it spend too much time to insert data, but when you can excute it when you want to test this case. - # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml.json -y " % binPath) # tdSql.execute("use db") # tdSql.query("select count(*) from stb0") # tdSql.checkData(0, 0, 5000000) # tdSql.query("select count(*) from stb1") # tdSql.checkData(0, 0, 5000000) - # os.system("%staosdemo -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insertMaxNumPerReq-sml-telnet.json -y " % binPath) # tdSql.execute("use db") # tdSql.query("select count(*) from stb0") # tdSql.checkData(0, 0, 5000000) @@ -201,7 +201,7 @@ class TDTestCase: # insert: timestamp and step - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-timestep-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-timestep-sml.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10) @@ -217,7 +217,7 @@ class TDTestCase: tdSql.checkData(0, 0, 400) # # insert: disorder_ratio - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-disorder-sml.json 2>&1 -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-disorder-sml.json 2>&1 -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) @@ -229,7 +229,7 @@ class TDTestCase: tdSql.checkData(0, 0, 10) # insert: sample json - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-sample-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-sample-sml.json -y " % binPath) tdSql.execute("use dbtest123") tdSql.query("select c2 from stb0") tdSql.checkData(0, 0, 2147483647) @@ -241,7 +241,7 @@ class TDTestCase: tdSql.checkRows(10) # insert: test interlace parament - os.system("%staosdemo -f tools/taosdemoAllTest/sml/insert-interlace-row-sml.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/sml/insert-interlace-row-sml.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 100) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py index f09880ab727d9a197fb602663da1dc4c6fff7bb7..5dba103ef9eafaf15d3159cae94e2b3a264cd8a9 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmt.py @@ -49,7 +49,7 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # insert: create one or mutiple tables per sql and insert multiple rows per sql - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-1s1tnt1r-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-1s1tnt1r-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1000) @@ -66,7 +66,7 @@ class TDTestCase: # insert: create mutiple tables per sql and insert one rows per sql . - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-1s1tntmr-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-1s1tntmr-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 10) @@ -83,7 +83,7 @@ class TDTestCase: # insert: using parament "insert_interval to controls spped of insert. # but We need to have accurate methods to control the speed, such as getting the speed value, checking the count and so on。 - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-interval-speed-stmt.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-interval-speed-stmt.json -y" % binPath) tdSql.execute("use db") tdSql.query("show stables") tdSql.checkData(0, 4, 100) @@ -101,9 +101,9 @@ class TDTestCase: # spend 2min30s for 3 testcases. # insert: drop and child_table_exists combination test # insert: using parament "childtable_offset and childtable_limit" to control table'offset point and offset - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-nodbnodrop-stmt.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-nodbnodrop-stmt.json -y" % binPath) tdSql.error("show dbno.stables") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-newdb-stmt.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-newdb-stmt.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 5) @@ -115,7 +115,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count (tbname) from stb4") tdSql.checkData(0, 0, 8) - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-offset-stmt.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-offset-stmt.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 50) @@ -127,7 +127,7 @@ class TDTestCase: tdSql.checkData(0, 0, 180) tdSql.query("select count(*) from stb4") tdSql.checkData(0, 0, 160) - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-newtable-stmt.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-newtable-stmt.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 150) @@ -139,7 +139,7 @@ class TDTestCase: tdSql.checkData(0, 0, 340) tdSql.query("select count(*) from stb4") tdSql.checkData(0, 0, 400) - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-renewdb-stmt.json -y" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-renewdb-stmt.json -y" % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 50) @@ -155,29 +155,29 @@ class TDTestCase: # insert: let parament in json file is illegal, it'll expect error. tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertColumnsAndTagNumLarge4096-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertColumnsAndTagNumLarge4096-stmt.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertSigcolumnsNum4096-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertSigcolumnsNum4096-stmt.json -y " % binPath) tdSql.error("select * from db.stb0") # tdSql.execute("drop database if exists db") - # os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertColumnsAndTagNum4096-stmt.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertColumnsAndTagNum4096-stmt.json -y " % binPath) # tdSql.query("select count(*) from db.stb0") # tdSql.checkData(0, 0, 10000) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertInterlaceRowsLarge1M-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertInterlaceRowsLarge1M-stmt.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkRows(0) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertColumnsNum0-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertColumnsNum0-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("show stables like 'stb0%' ") tdSql.checkData(0, 2, 11) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertTagsNumLarge128-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertTagsNumLarge128-stmt.json -y " % binPath) tdSql.error("use db1") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertBinaryLenLarge16374AllcolLar49151-stmt.json -y " % binPath) tdSql.query("select count(*) from db.stb0") tdSql.checkRows(1) tdSql.query("select count(*) from db.stb1") @@ -187,19 +187,19 @@ class TDTestCase: tdSql.query("select count(*) from db.stb3") tdSql.checkRows(1) tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReq0-stmt.json -y " % binPath) tdSql.error("select count(*) from db.stb0") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReqless0-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertNumOfrecordPerReqless0-stmt.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertChildTab0-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertChildTab0-stmt.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists db") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertChildTabLess0-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertChildTabLess0-stmt.json -y " % binPath) tdSql.error("use db") tdSql.execute("drop database if exists blf") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertTimestepMulRowsLargeint16-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertTimestepMulRowsLargeint16-stmt.json -y " % binPath) tdSql.execute("use blf") tdSql.query("select ts from blf.p_0_topics_7 limit 262800,1") tdSql.checkData(0, 0, "2020-03-31 12:00:00.000") @@ -207,7 +207,7 @@ class TDTestCase: tdSql.checkData(0, 0, "2019-10-01 00:00:00") tdSql.query("select last(ts) from blf.p_0_topics_6 ") tdSql.checkData(0, 0, "2020-09-29 23:59:00") - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insertMaxNumPerReq-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insertMaxNumPerReq-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count(*) from stb0") tdSql.checkData(0, 0, 5000000) @@ -216,7 +216,7 @@ class TDTestCase: # insert: sample json - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-sample-ts-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-sample-ts-stmt.json -y " % binPath) tdSql.execute("use dbtest123") tdSql.query("select c2 from stb0") tdSql.checkData(0, 0, 2147483647) @@ -235,7 +235,7 @@ class TDTestCase: tdSql.checkRows(10) # insert: timestamp and step - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-timestep-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-timestep-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("show stables") tdSql.query("select count (tbname) from stb0") @@ -252,7 +252,7 @@ class TDTestCase: tdSql.checkData(0, 0, 400) # # insert: disorder_ratio - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-disorder-stmt.json 2>&1 -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-disorder-stmt.json 2>&1 -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) @@ -264,7 +264,7 @@ class TDTestCase: tdSql.checkData(0, 0, 10) # insert: sample json - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-sample-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-sample-stmt.json -y " % binPath) tdSql.execute("use dbtest123") tdSql.query("select c2 from stb0") tdSql.checkData(0, 0, 2147483647) @@ -276,7 +276,7 @@ class TDTestCase: tdSql.checkRows(10) # insert: test interlace parament - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/insert-interlace-row-stmt.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/insert-interlace-row-stmt.json -y " % binPath) tdSql.execute("use db") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 100) @@ -289,7 +289,7 @@ class TDTestCase: tdSql.execute('drop database if exists db') tdSql.execute('create database db') tdSql.execute('use db') - os.system("%staosdemo -y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-N00-stmt.json " % binPath) # drop = no, child_table_exists, auto_create_table varies + os.system("%staosBenchmark -y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-N00-stmt.json " % binPath) # drop = no, child_table_exists, auto_create_table varies tdSql.execute('use db') tdSql.query('show tables like \'NN123%\'') #child_table_exists = no, auto_create_table varies = 123 tdSql.checkRows(20) @@ -305,7 +305,7 @@ class TDTestCase: tdSql.checkRows(0) tdSql.execute('drop database if exists db') - os.system("%staosdemo -y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-Y00-stmt.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies + os.system("%staosBenchmark -y -f tools/taosdemoAllTest/stmt/insert-drop-exist-auto-Y00-stmt.json " % binPath) # drop = yes, child_table_exists, auto_create_table varies tdSql.execute('use db') tdSql.query('show tables like \'YN123%\'') #child_table_exists = no, auto_create_table varies = 123 tdSql.checkRows(20) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py index bc8cf74ab21c20be24dcd4c9c53d9dc01b49f1c4..ff22ffe5a56bf69559d77bc202f289d4349e1e38 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestInsertWithJsonStmtPerformance.py @@ -49,16 +49,16 @@ class TDTestCase: binPath = buildPath+ "/build/bin/" # insert: create one or mutiple tables per sql and insert multiple rows per sql - os.system("%staosdemo -f tools/taosdemoAllTest/stmt/1174-small-stmt-random.json -y " % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/1174-small-stmt-random.json -y " % binPath) # sleep(60) - # os.system("%staosdemo -f tools/taosdemoAllTest/stmt/1174-small-taosc.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/1174-small-taosc.json -y " % binPath) # sleep(60) - # os.system("%staosdemo -f tools/taosdemoAllTest/stmt/1174-small-stmt.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/1174-small-stmt.json -y " % binPath) # sleep(60) - # os.system("%staosdemo -f tools/taosdemoAllTest/stmt/1174-large-taosc.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/1174-large-taosc.json -y " % binPath) # sleep(60) - # os.system("%staosdemo -f tools/taosdemoAllTest/stmt/1174-large-stmt.json -y " % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/stmt/1174-large-stmt.json -y " % binPath) # tdSql.execute("use db") # tdSql.query("select count (tbname) from stb0") diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py index 4025e023809d773d750314c8fa635be664b2ff76..e0b56b93ba0ed2c1e0a3e25bdc176059ea1ef61a 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestQueryWithJson.py @@ -108,10 +108,10 @@ class TDTestCase: # taosc query: query specified table and query super table os.system( - "%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryInsertdata.json" % binPath) os.system( - "%staosdemo -f tools/taosdemoAllTest/queryTaosc.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryTaosc.json" % binPath) os.system("cat query_res0.txt* > all_query_res0_taosc.txt") os.system("cat query_res1.txt* > all_query_res1_taosc.txt") @@ -138,10 +138,10 @@ class TDTestCase: # use restful api to query os.system( - "%staosdemo -f tools/taosdemoAllTest/queryInsertrestdata.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryInsertrestdata.json" % binPath) os.system( - "%staosdemo -f tools/taosdemoAllTest/queryRestful.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryRestful.json" % binPath) os.system("cat query_res0.txt* > all_query_res0_rest.txt") os.system("cat query_res1.txt* > all_query_res1_rest.txt") @@ -175,55 +175,55 @@ class TDTestCase: # query times less than or equal to 100 os.system( - "%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryInsertdata.json" % binPath) os.system( - "%staosdemo -f tools/taosdemoAllTest/querySpeciMutisql100.json" % + "%staosBenchmark -f tools/taosdemoAllTest/querySpeciMutisql100.json" % binPath) os.system( - "%staosdemo -f tools/taosdemoAllTest/querySuperMutisql100.json" % + "%staosBenchmark -f tools/taosdemoAllTest/querySuperMutisql100.json" % binPath) # query result print QPS os.system( - "%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryInsertdata.json" % binPath) exceptcode = os.system( - "%staosdemo -f tools/taosdemoAllTest/queryQps.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryQps.json" % binPath) assert exceptcode == 0 # use illegal or out of range parameters query json file os.system( - "%staosdemo -f tools/taosdemoAllTest/queryInsertdata.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryInsertdata.json" % binPath) exceptcode = os.system( - "%staosdemo -f tools/taosdemoAllTest/queryTimes0.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryTimes0.json" % binPath) assert exceptcode != 0 exceptcode0 = os.system( - "%staosdemo -f tools/taosdemoAllTest/queryTimesless0.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryTimesless0.json" % binPath) assert exceptcode0 != 0 exceptcode1 = os.system( - "%staosdemo -f tools/taosdemoAllTest/queryConcurrentless0.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryConcurrentless0.json" % binPath) assert exceptcode1 != 0 exceptcode2 = os.system( - "%staosdemo -f tools/taosdemoAllTest/queryConcurrent0.json" % + "%staosBenchmark -f tools/taosdemoAllTest/queryConcurrent0.json" % binPath) assert exceptcode2 != 0 exceptcode3 = os.system( - "%staosdemo -f tools/taosdemoAllTest/querrThreadsless0.json" % + "%staosBenchmark -f tools/taosdemoAllTest/querrThreadsless0.json" % binPath) assert exceptcode3 != 0 exceptcode4 = os.system( - "%staosdemo -f tools/taosdemoAllTest/querrThreads0.json" % + "%staosBenchmark -f tools/taosdemoAllTest/querrThreads0.json" % binPath) assert exceptcode4 != 0 diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py index 3e967581a4491da4108b981ccd83949751406b82..265f50237bf2b5dae80eccc94aad885a7b84f5f2 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJson.py @@ -74,8 +74,8 @@ class TDTestCase: os.system("rm -rf ./all_subscribe_res*") sleep(2) # subscribe: sync - os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath) - os.system("nohup %staosdemo -f tools/taosdemoAllTest/subSync.json &" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/subInsertdata.json" % binPath) + os.system("nohup %staosBenchmark -f tools/taosdemoAllTest/subSync.json &" % binPath) query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/subSync.json" |grep -v "grep"|awk \'{print $2}\'')[1]) # insert extral data @@ -112,21 +112,21 @@ class TDTestCase: os.system("rm -rf ./all_subscribe*") # # sql number lager 100 - os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) - assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0 - assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath) != 0 + os.system("%staosBenchmark -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) + assert os.system("%staosBenchmark -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0 + assert os.system("%staosBenchmark -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath) != 0 # # result files is null - # os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) - # os.system("%staosdemo -f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) - # # assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) != 0 + # os.system("%staosBenchmark -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) + # # assert os.system("%staosBenchmark -f tools/taosdemoAllTest/subSyncResFileNull.json" % binPath) != 0 # resubAfterConsume= -1 endAfter=-1 ; os.system('kill -9 `ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'` ') - os.system("nohup %staosdemo -f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1.json & " % binPath) + os.system("nohup %staosBenchmark -f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1.json & " % binPath) sleep(2) query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1.json" |grep -v "grep"|awk \'{print $2}\'')[1]) print("get sub1 process'pid") @@ -144,9 +144,9 @@ class TDTestCase: os.system("rm -rf ./subscribe_res*") # # resubAfterConsume= -1 endAfter=0 ; - # os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) # os.system('kill -9 `ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'` ') - # os.system("nohup %staosdemo -f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfter0.json & " % binPath) + # os.system("nohup %staosBenchmark -f tools/taosdemoAllTest/Resubjson/subSyncResubACMinus1endAfter0.json & " % binPath) # sleep(2) # query_pid1 = int(subprocess.getstatusoutput('ps aux|grep "subSyncResubACMinus1endAfter0.json" |grep -v "grep"|awk \'{print $2}\'')[1]) # print("get sub2 process'pid") @@ -185,8 +185,8 @@ class TDTestCase: # self.assertCheck("all_subscribe_res2.txt",subTimes2 ,1900) - # os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath) - # os.system("%staosdemo -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath) + # os.system("%staosBenchmark -f tools/taosdemoAllTest/subSupermaxsql100.json" % binPath) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py index f2aa01e8703d9703d647507736130de2dd582bfb..b236b2b48b93f210f0e73ebb5be240413f82d878 100644 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py +++ b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSubWithJsonAsync.py @@ -72,8 +72,8 @@ class TDTestCase: os.system("rm -rf ./all_subscribe_res*") # subscribe: resultfile - os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdata.json" % binPath) - os.system("nohup %staosdemo -f tools/taosdemoAllTest/subAsync.json &" % binPath) + os.system("%staosBenchmark -f tools/taosdemoAllTest/subInsertdata.json" % binPath) + os.system("nohup %staosBenchmark -f tools/taosdemoAllTest/subAsync.json &" % binPath) query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/subAsync.json" |grep -v "grep"|awk \'{print $2}\'')[1]) # insert extral data @@ -106,9 +106,9 @@ class TDTestCase: os.system("kill -9 %d" % query_pid) # # query times less than or equal to 100 - os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) - assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0 - assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath) != 0 + os.system("%staosBenchmark -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath) + assert os.system("%staosBenchmark -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) != 0 + assert os.system("%staosBenchmark -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath) != 0 # delete useless files os.system("rm -rf ./insert_res.txt") diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py deleted file mode 100644 index d8c68af0f9b43443744d7d799db6f5ee1e1dacaa..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoInsert.py +++ /dev/null @@ -1,168 +0,0 @@ -################################################################### -# Copyright (c) 2016 by TAOS Technologies, Inc. -# All rights reserved. -# -# This file is proprietary and confidential to TAOS Technologies. -# No part of this file may be reproduced, stored, transmitted, -# disclosed or used in any form or by any means other than as -# expressly provided by the written permission from Jianhui Tao -# -################################################################### - -# -*- coding: utf-8 -*- - -import sys -import os -from util.log import * -from util.cases import * -from util.sql import * -from util.dnodes import * - - -class TDTestCase: - def init(self, conn, logSql): - tdLog.debug("start to execute %s" % __file__) - tdSql.init(conn.cursor(), logSql) - - def getBuildPath(self): - selfPath = os.path.dirname(os.path.realpath(__file__)) - - if ("community" in selfPath): - projPath = selfPath[:selfPath.find("community")] - else: - projPath = selfPath[:selfPath.find("tests")] - - for root, dirs, files in os.walk(projPath): - if ("taosd" in files): - rootRealPath = os.path.dirname(os.path.realpath(root)) - if ("packaging" not in rootRealPath): - buildPath = root[:len(root) - len("/build/bin")] - break - return buildPath - - def run(self): - buildPath = self.getBuildPath() - if (buildPath == ""): - tdLog.exit("taosd not found!") - else: - tdLog.info("taosd found in %s" % buildPath) - binPath = buildPath + "/build/bin/" - - # insert: create one or mutiple tables per sql and insert multiple rows per sql - # insert data from a special timestamp - # check stable stb0 - - os.system( - "%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabase.json -y " % - binPath) - tdSql.execute("use nsdb") - tdSql.query("show stables") - tdSql.checkData(0, 4, 100) - tdSql.query("select count (tbname) from stb0") - tdSql.checkData(0, 0, 100) - tdSql.query("select count(*) from tb0_0") - tdSql.checkData(0, 0, 100) - tdSql.query("select count(*) from stb0") - tdSql.checkData(0, 0, 10000) - tdSql.query("describe stb0") - tdSql.checkDataType(9, 1, "TIMESTAMP") - tdSql.query("select last(ts) from stb0") - tdSql.checkData(0, 0, "2021-07-01 00:00:00.990000000") - - # check stable stb1 which is insert with disord - - tdSql.query("select count (tbname) from stb1") - tdSql.checkData(0, 0, 100) - tdSql.query("select count(*) from tb1_0") - tdSql.checkData(0, 0, 100) - tdSql.query("select count(*) from stb1") - tdSql.checkData(0, 0, 10000) - # check c8 is an nano timestamp - tdSql.query("describe stb1") - tdSql.checkDataType(9, 1, "TIMESTAMP") - # check insert timestamp_step is nano_second - tdSql.query("select last(ts) from stb1") - tdSql.checkData(0, 0, "2021-07-01 00:00:00.990000000") - - # insert data from now time - - # check stable stb0 - os.system( - "%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabaseNow.json -y " % - binPath) - - tdSql.execute("use nsdb2") - tdSql.query("show stables") - tdSql.checkData(0, 4, 100) - tdSql.query("select count (tbname) from stb0") - tdSql.checkData(0, 0, 100) - tdSql.query("select count(*) from tb0_0") - tdSql.checkData(0, 0, 100) - tdSql.query("select count(*) from stb0") - tdSql.checkData(0, 0, 10000) - # check c8 is an nano timestamp - tdSql.query("describe stb0") - tdSql.checkDataType(9, 1, "TIMESTAMP") - - # insert by csv files and timetamp is long int , strings in ts and - # cols - - os.system( - "%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabasecsv.json -y " % - binPath) - tdSql.execute("use nsdbcsv") - tdSql.query("show stables") - tdSql.checkData(0, 4, 100) - tdSql.query("select count(*) from stb0") - tdSql.checkData(0, 0, 10000) - tdSql.query("describe stb0") - tdSql.checkDataType(3, 1, "TIMESTAMP") - tdSql.query( - "select count(*) from stb0 where ts > \"2021-07-01 00:00:00.490000000\"") - tdSql.checkData(0, 0, 5000) - tdSql.query("select count(*) from stb0 where ts < 1626918583000000000") - tdSql.checkData(0, 0, 10000) - - os.system("rm -rf ./insert_res.txt") - os.system("rm -rf tools/taosdemoAllTest/taosdemoTestSupportNano*.py.sql") - - # taosdemo test insert with command and parameter , detals show - # taosdemo --help - os.system( - "%staosdemo -u root -ptaosdata -P 6030 -a 1 -m pre -n 10 -T 20 -t 60 -o res.txt -y " % - binPath) - tdSql.query("select count(*) from test.meters") - tdSql.checkData(0, 0, 600) - # check taosdemo -s - - sqls_ls = [ - 'drop database if exists nsdbsql;', - 'create database nsdbsql precision "ns" keep 36500 days 6 update 1;', - 'use nsdbsql;', - 'CREATE STABLE meters (ts timestamp, current float, voltage int, phase float) TAGS (location binary(64), groupdId int);', - 'CREATE TABLE d1001 USING meters TAGS ("Beijing.Chaoyang", 2);', - 'INSERT INTO d1001 USING METERS TAGS ("Beijng.Chaoyang", 2) VALUES (now, 10.2, 219, 0.32);', - 'INSERT INTO d1001 USING METERS TAGS ("Beijng.Chaoyang", 2) VALUES (now, 85, 32, 0.76);'] - - with open("./taosdemoTestNanoCreateDB.sql", mode="a") as sql_files: - for sql in sqls_ls: - sql_files.write(sql + "\n") - sql_files.close() - - sleep(10) - - os.system("%staosdemo -s taosdemoTestNanoCreateDB.sql -y " % binPath) - tdSql.query("select count(*) from nsdbsql.meters") - tdSql.checkData(0, 0, 2) - - os.system("rm -rf ./res.txt") - os.system("rm -rf ./*.py.sql") - os.system("rm -rf ./taosdemoTestNanoCreateDB.sql") - - def stop(self): - tdSql.close() - tdLog.success("%s successfully executed" % __file__) - - -tdCases.addWindows(__file__, TDTestCase()) -tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json deleted file mode 100644 index fff1017588bb10f55a82aa2bd7bc6997df71abfd..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "filetype": "query", - "cfgdir": "/etc/taos", - "host": "127.0.0.1", - "port": 6030, - "user": "root", - "password": "taosdata", - "confirm_parameter_prompt": "no", - "databases": "nsdb", - "query_times": 10, - "query_mode": "taosc", - "specified_table_query": { - "query_interval": 1, - "concurrent": 2, - "sqls": [ - { - "sql": "select count(*) from stb0 where ts>\"2021-07-01 00:01:00.000000000 \" ;", - "result": "./query_res0.txt" - }, - { - "sql": "select count(*) from stb0 where ts>\"2021-07-01 00:01:00.000000000\" and ts <=\"2021-07-01 00:01:10.000000000\" ;", - "result": "./query_res1.txt" - }, - { - "sql": "select count(*) from stb0 where ts>now-20d ;", - "result": "./query_res2.txt" - }, - { - "sql": "select max(c10) from stb0;", - "result": "./query_res3.txt" - }, - { - "sql": "select min(c1) from stb0;", - "result": "./query_res4.txt" - }, - { - "sql": "select avg(c1) from stb0;", - "result": "./query_res5.txt" - }, - { - "sql":"select count(*) from stb0 group by tbname;", - "result":"./query_res6.txt" - } - - ] - }, - "super_table_query": { - "stblname": "stb0", - "query_interval": 0, - "threads": 4, - "sqls": [ - { - "sql": "select count(*) from xxxx where ts>\"2021-07-01 00:01:00.000000000 \" ;", - "result": "./query_res_tb0.txt" - }, - { - "sql":"select count(*) from xxxx where ts>\"2021-07-01 00:01:00.000000000\" and ts <=\"2021-07-01 00:01:10.000000000\" ;", - "result": "./query_res_tb1.txt" - }, - { - "sql":"select first(*) from xxxx ;", - "result": "./query_res_tb2.txt" - }, - { - "sql":"select last(*) from xxxx;", - "result": "./query_res_tb3.txt" - - }, - { - "sql":"select last_row(*) from xxxx ;", - "result": "./query_res_tb4.txt" - - }, - { - "sql":"select max(c10) from xxxx ;", - "result": "./query_res_tb5.txt" - - }, - { - "sql":"select min(c1) from xxxx ;", - "result": "./query_res_tb6.txt" - - }, - { - "sql":"select avg(c10) from xxxx ;", - "result": "./query_res_tb7.txt" - - } - - ] - } - } \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py deleted file mode 100644 index 5a37cf9c7cf3153a7bcabb0bc9258063e5f05f09..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.py +++ /dev/null @@ -1,157 +0,0 @@ -################################################################### -# Copyright (c) 2016 by TAOS Technologies, Inc. -# All rights reserved. -# -# This file is proprietary and confidential to TAOS Technologies. -# No part of this file may be reproduced, stored, transmitted, -# disclosed or used in any form or by any means other than as -# expressly provided by the written permission from Jianhui Tao -# -################################################################### - -# -*- coding: utf-8 -*- - -import sys -import os -from util.log import * -from util.cases import * -from util.sql import * -from util.dnodes import * - - -class TDTestCase: - def init(self, conn, logSql): - tdLog.debug("start to execute %s" % __file__) - tdSql.init(conn.cursor(), logSql) - - def getBuildPath(self): - selfPath = os.path.dirname(os.path.realpath(__file__)) - - if ("community" in selfPath): - projPath = selfPath[:selfPath.find("community")] - else: - projPath = selfPath[:selfPath.find("tests")] - - for root, dirs, files in os.walk(projPath): - if ("taosd" in files): - rootRealPath = os.path.dirname(os.path.realpath(root)) - if ("packaging" not in rootRealPath): - buildPath = root[:len(root)-len("/build/bin")] - break - return buildPath - - def run(self): - buildPath = self.getBuildPath() - if (buildPath == ""): - tdLog.exit("taosd not found!") - else: - tdLog.info("taosd found in %s" % buildPath) - binPath = buildPath+ "/build/bin/" - - # query: query test for nanoSecond with where and max min groupby order - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabase.json -y " % binPath) - - tdSql.execute("use nsdb") - - # use where to filter - - tdSql.query("select count(*) from stb0 where ts>\"2021-07-01 00:00:00.590000000 \" ") - tdSql.checkData(0, 0, 4000) - tdSql.query("select count(*) from stb0 where ts>\"2021-07-01 00:00:00.000000000\" and ts <=\"2021-07-01 00:00:00.590000000\" ") - tdSql.checkData(0, 0, 5900) - - tdSql.query("select count(*) from tb0_0 where ts>\"2021-07-01 00:00:00.590000000 \" ;") - tdSql.checkData(0, 0, 40) - tdSql.query("select count(*) from tb0_0 where ts>\"2021-07-01 00:00:00.000000000\" and ts <=\"2021-07-01 00:00:00.590000000\" ") - tdSql.checkData(0, 0, 59) - - - # select max min avg from special col - tdSql.query("select max(c10) from stb0;") - print("select max(c10) from stb0 : " , tdSql.getData(0, 0)) - - tdSql.query("select max(c10) from tb0_0;") - print("select max(c10) from tb0_0 : " , tdSql.getData(0, 0)) - - - tdSql.query("select min(c1) from stb0;") - print( "select min(c1) from stb0 : " , tdSql.getData(0, 0)) - - tdSql.query("select min(c1) from tb0_0;") - print( "select min(c1) from tb0_0 : " , tdSql.getData(0, 0)) - - tdSql.query("select avg(c1) from stb0;") - print( "select avg(c1) from stb0 : " , tdSql.getData(0, 0)) - - tdSql.query("select avg(c1) from tb0_0;") - print( "select avg(c1) from tb0_0 : " , tdSql.getData(0, 0)) - - tdSql.query("select count(*) from stb0 group by tbname;") - tdSql.checkData(0, 0, 100) - tdSql.checkData(10, 0, 100) - - # query : query above sqls by taosdemo and continuously - - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoTestSupportNanoQuery.json -y " % binPath) - - - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabasecsv.json -y " % binPath) - tdSql.execute("use nsdbcsv") - tdSql.query("show stables") - tdSql.checkData(0, 4, 100) - tdSql.query("select count(*) from stb0") - tdSql.checkData(0, 0, 10000) - tdSql.query("describe stb0") - tdSql.checkDataType(3, 1, "TIMESTAMP") - tdSql.query("select count(*) from stb0 where ts >\"2021-07-01 00:00:00.490000000\"") - tdSql.checkData(0, 0, 5000) - tdSql.query("select count(*) from stb0 where ts 162687012800000000') - tdSql.execute('select count(*) from stb0 where c2 < 162687012800000000') - tdSql.execute('select count(*) from stb0 where c2 = 162687012800000000') - tdSql.execute('select count(*) from stb0 where c2 != 162687012800000000') - tdSql.execute('select count(*) from stb0 where c2 <> 162687012800000000') - tdSql.execute('select count(*) from stb0 where c2 > "2021-07-21 20:22:08.248246976"') - tdSql.execute('select count(*) from stb0 where c2 < "2021-07-21 20:22:08.248246976"') - tdSql.execute('select count(*) from stb0 where c2 = "2021-07-21 20:22:08.248246976"') - tdSql.execute('select count(*) from stb0 where c2 != "2021-07-21 20:22:08.248246976"') - tdSql.execute('select count(*) from stb0 where c2 <> "2021-07-21 20:22:08.248246976"') - tdSql.execute('select count(*) from stb0 where ts between "2021-07-01 00:00:00.000000000" and "2021-07-01 00:00:00.990000000"') - tdSql.execute('select count(*) from stb0 where ts between 1625068800000000000 and 1625068801000000000') - tdSql.query('select avg(c0) from stb0 interval(5000000000b)') - tdSql.checkRows(1) - - tdSql.query('select avg(c0) from stb0 interval(100000000b)') - tdSql.checkRows(10) - - tdSql.error('select avg(c0) from stb0 interval(1b)') - tdSql.error('select avg(c0) from stb0 interval(999b)') - - tdSql.query('select avg(c0) from stb0 interval(1000b)') - tdSql.checkRows(100) - - tdSql.query('select avg(c0) from stb0 interval(1u)') - tdSql.checkRows(100) - - tdSql.query('select avg(c0) from stb0 interval(100000000b) sliding (100000000b)') - tdSql.checkRows(10) - - # query : query above sqls by taosdemo and continuously - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json -y " % binPath) - - os.system("rm -rf ./query_res*.txt*") - os.system("rm -rf tools/taosdemoAllTest/*.py.sql") - - - - - def stop(self): - tdSql.close() - tdLog.success("%s successfully executed" % __file__) - - -tdCases.addWindows(__file__, TDTestCase()) -tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json deleted file mode 100644 index a3b3c75efa6680aa0d1da0ca7986d863408ee515..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoQuerycsv.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "filetype": "query", - "cfgdir": "/etc/taos", - "host": "127.0.0.1", - "port": 6030, - "user": "root", - "password": "taosdata", - "confirm_parameter_prompt": "no", - "databases": "nsdbcsv", - "query_times": 10, - "query_mode": "taosc", - "specified_table_query": { - "query_interval": 1, - "concurrent": 2, - "sqls": [ - { - "sql": "select count(*) from stb0 where ts> \"2021-07-01 00:00:00.490000000\" ;", - "result": "./query_res0.txt" - }, - { - "sql": "select count(*) from stb0 where ts < now -22d-1h-3s ;", - "result": "./query_res1.txt" - }, - { - "sql": "select count(*) from stb0 where ts < 1626918583000000000 ;", - "result": "./query_res2.txt" - }, - { - "sql": "select count(*) from stb0 where c2 <> 162687012800000000';", - "result": "./query_res3.txt" - }, - { - "sql": "select count(*) from stb0 where c2 != \"2021-07-21 20:22:08.248246976\";", - "result": "./query_res4.txt" - }, - { - "sql": "select count(*) from stb0 where ts between \"2021-07-01 00:00:00.000000000\" and \"2021-07-01 00:00:00.990000000\";", - "result": "./query_res5.txt" - }, - { - "sql":"select count(*) from stb0 group by tbname;", - "result":"./query_res6.txt" - }, - { - "sql":"select count(*) from stb0 where ts between 1625068800000000000 and 1625068801000000000;", - "result":"./query_res7.txt" - }, - { - "sql":"select avg(c0) from stb0 interval(5000000000b);", - "result":"./query_res8.txt" - }, - { - "sql":"select avg(c0) from stb0 interval(100000000b) sliding (100000000b);", - "result":"./query_res9.txt" - } - - ] - }, - "super_table_query": { - "stblname": "stb0", - "query_interval": 0, - "threads": 4, - "sqls": [ - { - "sql": "select count(*) from xxxx where ts > \"2021-07-01 00:00:00.490000000\" ;", - "result": "./query_res_tb0.txt" - }, - { - "sql":"select count(*) from xxxx where ts between \"2021-07-01 00:00:00.000000000\" and \"2021-07-01 00:00:00.990000000\" ;", - "result": "./query_res_tb1.txt" - }, - { - "sql":"select first(*) from xxxx ;", - "result": "./query_res_tb2.txt" - }, - { - "sql":"select last(*) from xxxx;", - "result": "./query_res_tb3.txt" - - }, - { - "sql":"select last_row(*) from xxxx ;", - "result": "./query_res_tb4.txt" - - }, - { - "sql":"select max(c0) from xxxx ;", - "result": "./query_res_tb5.txt" - - }, - { - "sql":"select min(c0) from xxxx ;", - "result": "./query_res_tb6.txt" - - }, - { - "sql":"select avg(c0) from xxxx ;", - "result": "./query_res_tb7.txt" - - }, - { - "sql":"select avg(c0) from xxxx interval(100000000b) sliding (100000000b) ;", - "result": "./query_res_tb8.txt" - - } - - - ] - } - } \ No newline at end of file diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json deleted file mode 100644 index 1cc834164e7c966a9ce565f1ce481d823b1ed2d1..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "filetype":"subscribe", - "cfgdir": "/etc/taos", - "host": "127.0.0.1", - "port": 6030, - "user": "root", - "password": "taosdata", - "databases": "subnsdb", - "confirm_parameter_prompt": "no", - "specified_table_query": - { - "concurrent":2, - "mode":"sync", - "interval":10000, - "restart":"yes", - "keepProgress":"yes", - "sqls": [ - { - "sql": "select * from stb0 where ts>= \"2021-07-01 00:00:00.000000000\" ;", - "result": "./subscribe_res0.txt" - }, - { - "sql": "select * from stb0 where ts < now -2d-1h-3s ;", - "result": "./subscribe_res1.txt" - }, - { - "sql": "select * from stb0 where ts < 1626918583000000000 ;", - "result": "./subscribe_res2.txt" - }] - - } -} diff --git a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py b/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py deleted file mode 100644 index da02f45fa1141a028cfc305bae9babb1856ccb40..0000000000000000000000000000000000000000 --- a/tests/pytest/tools/taosdemoAllTest/taosdemoTestSupportNanosubscribe.py +++ /dev/null @@ -1,124 +0,0 @@ -################################################################### -# Copyright (c) 2016 by TAOS Technologies, Inc. -# All rights reserved. -# -# This file is proprietary and confidential to TAOS Technologies. -# No part of this file may be reproduced, stored, transmitted, -# disclosed or used in any form or by any means other than as -# expressly provided by the written permission from Jianhui Tao -# -################################################################### - -# -*- coding: utf-8 -*- - -import sys -import os -from util.log import * -from util.cases import * -from util.sql import * -from util.dnodes import * -import time -from datetime import datetime -import subprocess - - -class TDTestCase: - def init(self, conn, logSql): - tdLog.debug("start to execute %s" % __file__) - tdSql.init(conn.cursor(), logSql) - - def getBuildPath(self): - selfPath = os.path.dirname(os.path.realpath(__file__)) - - if ("community" in selfPath): - projPath = selfPath[:selfPath.find("community")] - else: - projPath = selfPath[:selfPath.find("tests")] - - for root, dirs, files in os.walk(projPath): - if ("taosd" in files): - rootRealPath = os.path.dirname(os.path.realpath(root)) - if ("packaging" not in rootRealPath): - buildPath = root[:len(root)-len("/build/bin")] - break - return buildPath - - # get the number of subscriptions - def subTimes(self,filename): - self.filename = filename - command = 'cat %s |wc -l'% filename - times = int(subprocess.getstatusoutput(command)[1]) - return times - - # assert results - def assertCheck(self,filename,subResult,expectResult): - self.filename = filename - self.subResult = subResult - self.expectResult = expectResult - args0 = (filename, subResult, expectResult) - assert subResult == expectResult , "Queryfile:%s ,result is %s != expect: %s" % args0 - - def run(self): - buildPath = self.getBuildPath() - if (buildPath == ""): - tdLog.exit("taosd not found!") - else: - tdLog.info("taosd found in %s" % buildPath) - binPath = buildPath+ "/build/bin/" - - # clear env - os.system("ps -ef |grep 'taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json' |grep -v 'grep' |awk '{print $2}'|xargs kill -9") - os.system("rm -rf ./subscribe_res*") - os.system("rm -rf ./all_subscribe_res*") - - - # insert data - os.system("%staosdemo -f tools/taosdemoAllTest/taosdemoTestNanoDatabaseInsertForSub.json" % binPath) - os.system("nohup %staosdemo -f tools/taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json &" % binPath) - query_pid = int(subprocess.getstatusoutput('ps aux|grep "taosdemoAllTest/taosdemoTestSupportNanoSubscribe.json" |grep -v "grep"|awk \'{print $2}\'')[1]) - - - # merge result files - sleep(5) - os.system("cat subscribe_res0.txt* > all_subscribe_res0.txt") - os.system("cat subscribe_res1.txt* > all_subscribe_res1.txt") - os.system("cat subscribe_res2.txt* > all_subscribe_res2.txt") - - - # correct subscribeTimes testcase - subTimes0 = self.subTimes("all_subscribe_res0.txt") - self.assertCheck("all_subscribe_res0.txt",subTimes0 ,200) - - subTimes1 = self.subTimes("all_subscribe_res1.txt") - self.assertCheck("all_subscribe_res1.txt",subTimes1 ,200) - - subTimes2 = self.subTimes("all_subscribe_res2.txt") - self.assertCheck("all_subscribe_res2.txt",subTimes2 ,200) - - - # insert extral data - tdSql.execute("use subnsdb") - tdSql.execute("insert into tb0_0 values(now,100.1000,'subtest1',now-1s)") - sleep(15) - - os.system("cat subscribe_res0.txt* > all_subscribe_res0.txt") - subTimes0 = self.subTimes("all_subscribe_res0.txt") - self.assertCheck("all_subscribe_res0.txt",subTimes0 ,202) - - - - # correct data testcase - os.system("kill -9 %d" % query_pid) - sleep(3) - os.system("rm -rf ./subscribe_res*") - os.system("rm -rf ./all_subscribe*") - os.system("rm -rf ./*.py.sql") - - - - def stop(self): - tdSql.close() - tdLog.success("%s successfully executed" % __file__) - -tdCases.addWindows(__file__, TDTestCase()) -tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/tools/taosdemoTest.py b/tests/pytest/tools/taosdemoTest.py index 3cdcdcef5afcb14c04204d2489571bdfed937080..54e0906672637c1187cb8b078f1e8496e461e150 100644 --- a/tests/pytest/tools/taosdemoTest.py +++ b/tests/pytest/tools/taosdemoTest.py @@ -51,7 +51,7 @@ class TDTestCase: else: tdLog.info("taosdemo found in %s" % buildPath) binPath = buildPath + "/build/bin/" - os.system("%staosdemo -y -t %d -n %d -b INT,INT,INT,INT" % + os.system("%staosBenchmark -y -t %d -n %d -b INT,INT,INT,INT" % (binPath, self.numberOfTables, self.numberOfRecords)) tdSql.execute("use test") diff --git a/tests/pytest/tools/taosdemoTestInterlace.py b/tests/pytest/tools/taosdemoTestInterlace.py index 30c04729b7966660bdb4851ad1b971130d08f726..5b9f6f319f6a451284b01e75a3714d44da1ce7c3 100644 --- a/tests/pytest/tools/taosdemoTestInterlace.py +++ b/tests/pytest/tools/taosdemoTestInterlace.py @@ -49,7 +49,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath + "/build/bin/" - taosdemoCmd = "%staosdemo -f tools/insert-interlace.json -PP 2>&1 | grep sleep | wc -l" % binPath + taosdemoCmd = "%staosBenchmark -f tools/insert-interlace.json -PP 2>&1 | grep sleep | wc -l" % binPath sleepTimes = subprocess.check_output( taosdemoCmd, shell=True).decode("utf-8") print("sleep times: %d" % int(sleepTimes)) diff --git a/tests/pytest/tools/taosdemoTestLimitOffset.py b/tests/pytest/tools/taosdemoTestLimitOffset.py index dd8a1bee701da0ffd2f764cdbedcf12f9dbedb3c..e69098b7f562f996b2bad58b10df63fdaf8a8398 100644 --- a/tests/pytest/tools/taosdemoTestLimitOffset.py +++ b/tests/pytest/tools/taosdemoTestLimitOffset.py @@ -51,8 +51,8 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath+ "/build/bin/" - os.system("%staosdemo -f tools/insert-tblimit-tboffset-createdb.json" % binPath) - os.system("%staosdemo -f tools/insert-tblimit-tboffset-insertrec.json" % binPath) + os.system("%staosBenchmark -f tools/insert-tblimit-tboffset-createdb.json" % binPath) + os.system("%staosBenchmark -f tools/insert-tblimit-tboffset-insertrec.json" % binPath) tdSql.execute("use db") tdSql.query("select count(tbname) from db.stb") @@ -60,8 +60,8 @@ class TDTestCase: tdSql.query("select count(*) from db.stb") tdSql.checkData(0, 0, 33000) - os.system("%staosdemo -f tools/insert-tblimit-tboffset-createdb.json" % binPath) - os.system("%staosdemo -f tools/insert-tblimit-tboffset0.json" % binPath) + os.system("%staosBenchmark -f tools/insert-tblimit-tboffset-createdb.json" % binPath) + os.system("%staosBenchmark -f tools/insert-tblimit-tboffset0.json" % binPath) tdSql.execute("reset query cache") tdSql.execute("use db") @@ -70,8 +70,8 @@ class TDTestCase: tdSql.query("select count(*) from db.stb") tdSql.checkData(0, 0, 20000) - os.system("%staosdemo -f tools/insert-tblimit-tboffset-createdb.json" % binPath) - os.system("%staosdemo -f tools/insert-tblimit1-tboffset.json" % binPath) + os.system("%staosBenchmark -f tools/insert-tblimit-tboffset-createdb.json" % binPath) + os.system("%staosBenchmark -f tools/insert-tblimit1-tboffset.json" % binPath) tdSql.execute("reset query cache") tdSql.execute("use db") diff --git a/tests/pytest/tools/taosdemoTestQuery.py b/tests/pytest/tools/taosdemoTestQuery.py index bb2bb85052a9b21dc9181887622ec2019707256b..c77688aefaf93898ae33044408dd4027d71b07e9 100644 --- a/tests/pytest/tools/taosdemoTestQuery.py +++ b/tests/pytest/tools/taosdemoTestQuery.py @@ -53,12 +53,12 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath + "/build/bin/" - os.system("%staosdemo -y -t %d -n %d" % + os.system("%staosBenchmark -y -t %d -n %d" % (binPath, self.numberOfTables, self.numberOfRecords)) print("Sleep 2 seconds..") time.sleep(2) - os.system('%staosdemo -f tools/query.json ' % binPath) -# taosdemoCmd = '%staosdemo -f tools/query.json ' % binPath + os.system('%staosBenchmark -f tools/query.json ' % binPath) +# taosdemoCmd = '%staosBenchmark -f tools/query.json ' % binPath # threads = subprocess.check_output( # taosdemoCmd, shell=True).decode("utf-8") # print("threads: %d" % int(threads)) diff --git a/tests/pytest/tools/taosdemoTestSampleData.py b/tests/pytest/tools/taosdemoTestSampleData.py index a8710a9df36358199e567de2efeb90e88b675312..09a2e6c43b68d8271cb0472b288279b54789fded 100644 --- a/tests/pytest/tools/taosdemoTestSampleData.py +++ b/tests/pytest/tools/taosdemoTestSampleData.py @@ -51,7 +51,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath+ "/build/bin/" - os.system("%staosdemo -f tools/taosdemo-sampledata.json" % binPath) + os.system("%staosBenchmark -f tools/taosdemo-sampledata.json" % binPath) tdSql.execute("use db") tdSql.query("select count(tbname) from db.stb") diff --git a/tests/pytest/tools/taosdemoTestTblAlt.py b/tests/pytest/tools/taosdemoTestTblAlt.py index 89c1b92e140cb1e19b549d3248693153e116c52e..7587ab9eb3e89275451864d28ccf985bcaac949a 100644 --- a/tests/pytest/tools/taosdemoTestTblAlt.py +++ b/tests/pytest/tools/taosdemoTestTblAlt.py @@ -54,9 +54,9 @@ class TDTestCase: binPath = buildPath + "/build/bin/" if(threadID == 0): - print("%staosdemo -y -t %d -n %d -b INT,INT,INT,INT" % + print("%staosBenchmark -y -t %d -n %d -b INT,INT,INT,INT" % (binPath, self.numberOfTables, self.numberOfRecords)) - os.system("%staosdemo -y -t %d -n %d -b INT,INT,INT,INT" % + os.system("%staosBenchmark -y -t %d -n %d -b INT,INT,INT,INT" % (binPath, self.numberOfTables, self.numberOfRecords)) if(threadID == 1): time.sleep(2) diff --git a/tests/pytest/tools/taosdemoTestWithJson.py b/tests/pytest/tools/taosdemoTestWithJson.py index b2ecd5497620bf5a0f90dd2e8529890423fd82a1..0868d07fd99f7731424a3f11883ae52d12f1e878 100644 --- a/tests/pytest/tools/taosdemoTestWithJson.py +++ b/tests/pytest/tools/taosdemoTestWithJson.py @@ -48,7 +48,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath + "/build/bin/" - os.system("%staosdemo -f tools/insert.json -y" % binPath) + os.system("%staosBenchmark -f tools/insert.json -y" % binPath) tdSql.execute("use db01") tdSql.query("select count(*) from stb01") diff --git a/tests/pytest/tools/taosdemoTestWithoutMetric.py b/tests/pytest/tools/taosdemoTestWithoutMetric.py index 01e19355d9dfde5c536ac1e28e1f190f33ab966e..a92a4519e2d716b85df0ec29c9cf49abb0812b47 100644 --- a/tests/pytest/tools/taosdemoTestWithoutMetric.py +++ b/tests/pytest/tools/taosdemoTestWithoutMetric.py @@ -50,7 +50,7 @@ class TDTestCase: else: tdLog.info("taosd found in %s" % buildPath) binPath = buildPath + "/build/bin/" - os.system("%staosdemo -N -y -t %d -n %d" % + os.system("%staosBenchmark -N -y -t %d -n %d" % (binPath, self.numberOfTables, self.numberOfRecords)) tdSql.query("show databases") diff --git a/tests/pytest/tools/taosdemoTestdatatype.py b/tests/pytest/tools/taosdemoTestdatatype.py index e32d895571da7d2a101dc32201ebba4754ec4740..ba99b0c532af3497de2daf4d0757b9105405dc1d 100644 --- a/tests/pytest/tools/taosdemoTestdatatype.py +++ b/tests/pytest/tools/taosdemoTestdatatype.py @@ -50,7 +50,7 @@ class TDTestCase: tdLog.info("taosdemo found in %s" % buildPath) binPath = buildPath + "/build/bin/" - os.system("%staosdemo -d test002 -y -t %d -n %d -b INT,nchar\\(8\\),binary\\(16\\),binary,nchar -w 8" % + os.system("%staosBenchmark -d test002 -y -t %d -n %d -b INT,nchar\\(8\\),binary\\(16\\),binary,nchar -w 8" % (binPath, self.numberOfTables, self.numberOfRecords)) tdSql.execute('use test002') @@ -68,7 +68,7 @@ class TDTestCase: tdSql.error('insert into d1 values(now,100,"abcd","abcd"') tdSql.error('insert into d1 values(now,100,100,100)') - os.system("%staosdemo -d test002 -y -t %d -n %d --data-type INT,nchar\\(8\\),binary\\(16\\),binary,nchar -w 8" % + os.system("%staosBenchmark -d test002 -y -t %d -n %d --data-type INT,nchar\\(8\\),binary\\(16\\),binary,nchar -w 8" % (binPath, self.numberOfTables, self.numberOfRecords)) tdSql.execute('use test002') @@ -76,7 +76,7 @@ class TDTestCase: tdSql.checkData(0, 0, self.numberOfTables * self.numberOfRecords) - os.system("%staosdemo -d test002 -y -t %d -n %d -bINT,nchar\\(8\\),binary\\(16\\),binary,nchar -w 8" % + os.system("%staosBenchmark -d test002 -y -t %d -n %d -bINT,nchar\\(8\\),binary\\(16\\),binary,nchar -w 8" % (binPath, self.numberOfTables, self.numberOfRecords)) tdSql.execute('use test002') diff --git a/tests/pytest/tsdb/tsdbComp.py b/tests/pytest/tsdb/tsdbComp.py index 3563655efe4e69fab4c51a40818da205efb29837..b01d9680c0f0147526676a8d3b124e187625e52a 100644 --- a/tests/pytest/tsdb/tsdbComp.py +++ b/tests/pytest/tsdb/tsdbComp.py @@ -59,11 +59,11 @@ class TDTestCase: #new db and insert data tdSql.execute("drop database if exists db2") - os.system("%staosdemo -f tsdb/insertDataDb1.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb1.json -y " % binPath) tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f tsdb/insertDataDb2.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb2.json -y " % binPath) tdSql.execute("drop table if exists db2.stb0") - os.system("%staosdemo -f tsdb/insertDataDb2Newstab.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb2Newstab.json -y " % binPath) tdSql.execute("use db2") tdSql.execute("drop table if exists stb1_0") diff --git a/tests/pytest/tsdb/tsdbCompCluster.py b/tests/pytest/tsdb/tsdbCompCluster.py index 3df4c9a9d47744bcf729e3d6b01c3b515626058b..c1c1181453c4ea0c34041f47e4b0f613d51d8f23 100644 --- a/tests/pytest/tsdb/tsdbCompCluster.py +++ b/tests/pytest/tsdb/tsdbCompCluster.py @@ -66,11 +66,11 @@ class TwoClients: # new db ,new super tables , child tables, and insert data tdSql.execute("drop database if exists db2") - os.system("%staosdemo -f tsdb/insertDataDb1.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb1.json -y " % binPath) tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f tsdb/insertDataDb2.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb2.json -y " % binPath) tdSql.execute("drop table if exists db2.stb0") - os.system("%staosdemo -f tsdb/insertDataDb2Newstab.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb2Newstab.json -y " % binPath) # new general tables and modify general tables; tdSql.execute("use db2") diff --git a/tests/pytest/tsdb/tsdbCompClusterReplica2.py b/tests/pytest/tsdb/tsdbCompClusterReplica2.py index cfda271497cde59e8dbe60150ddf935ba63fd9be..6c2b3993294c16859f548fa83b78f4af72f6d851 100644 --- a/tests/pytest/tsdb/tsdbCompClusterReplica2.py +++ b/tests/pytest/tsdb/tsdbCompClusterReplica2.py @@ -65,11 +65,11 @@ class TwoClients: # new db ,new super tables , child tables, and insert data tdSql.execute("drop database if exists db2") - os.system("%staosdemo -f tsdb/insertDataDb1Replica2.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb1Replica2.json -y " % binPath) tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f tsdb/insertDataDb2Replica2.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb2Replica2.json -y " % binPath) tdSql.execute("drop table if exists db2.stb0") - os.system("%staosdemo -f tsdb/insertDataDb2NewstabReplica2.json -y " % binPath) + os.system("%staosBenchmark -f tsdb/insertDataDb2NewstabReplica2.json -y " % binPath) # new general tables and modify general tables; tdSql.execute("use db2") diff --git a/tests/pytest/wal/sdbComp.py b/tests/pytest/wal/sdbComp.py index 428fbc9a145c0c3bae4507e33242ff3670c85024..90993014349e28f4d0e6a07646729e8ab04b319c 100644 --- a/tests/pytest/wal/sdbComp.py +++ b/tests/pytest/wal/sdbComp.py @@ -61,11 +61,11 @@ class TDTestCase: os.system("rm -rf %s/sim/dnode1/data/mnode_tmp/" % testPath) os.system("rm -rf %s/sim/dnode1/data/mnode_bak/" % testPath) tdSql.execute("drop database if exists db2") - os.system("%staosdemo -f wal/insertDataDb1.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb1.json -y " % binPath) tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f wal/insertDataDb2.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb2.json -y " % binPath) tdSql.execute("drop table if exists db2.stb0") - os.system("%staosdemo -f wal/insertDataDb2Newstab.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb2Newstab.json -y " % binPath) query_pid1 = int(subprocess.getstatusoutput('ps aux|grep taosd |grep -v "grep"|awk \'{print $2}\'')[1]) print(query_pid1) tdSql.execute("use db2") diff --git a/tests/pytest/wal/sdbCompCluster.py b/tests/pytest/wal/sdbCompCluster.py index 4fa84817ec01c9e5adfdb4a76bc29a4a6c49abfc..0be0f441d032a6a7ec5083472d02c7976a84c75f 100644 --- a/tests/pytest/wal/sdbCompCluster.py +++ b/tests/pytest/wal/sdbCompCluster.py @@ -66,11 +66,11 @@ class TwoClients: os.system("rm -rf /var/lib/taos/mnode_bak/") os.system("rm -rf /var/lib/taos/mnode_temp/") tdSql.execute("drop database if exists db2") - os.system("%staosdemo -f wal/insertDataDb1.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb1.json -y " % binPath) tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f wal/insertDataDb2.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb2.json -y " % binPath) tdSql.execute("drop table if exists db2.stb0") - os.system("%staosdemo -f wal/insertDataDb2Newstab.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb2Newstab.json -y " % binPath) query_pid1 = int(subprocess.getstatusoutput('ps aux|grep taosd |grep -v "grep"|awk \'{print $2}\'')[1]) print(query_pid1) tdSql.execute("use db2") diff --git a/tests/pytest/wal/sdbCompClusterReplica2.py b/tests/pytest/wal/sdbCompClusterReplica2.py index ba80e3864aed27c091dd5ec72ca9f09ea2c36126..1a9354c61e1f4986a399a8684ccd3678c8bfaa7e 100644 --- a/tests/pytest/wal/sdbCompClusterReplica2.py +++ b/tests/pytest/wal/sdbCompClusterReplica2.py @@ -66,11 +66,11 @@ class TwoClients: os.system("rm -rf /var/lib/taos/mnode_bak/") os.system("rm -rf /var/lib/taos/mnode_temp/") tdSql.execute("drop database if exists db2") - os.system("%staosdemo -f wal/insertDataDb1Replica2.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb1Replica2.json -y " % binPath) tdSql.execute("drop database if exists db1") - os.system("%staosdemo -f wal/insertDataDb2Replica2.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb2Replica2.json -y " % binPath) tdSql.execute("drop table if exists db2.stb0") - os.system("%staosdemo -f wal/insertDataDb2NewstabReplica2.json -y " % binPath) + os.system("%staosBenchmark -f wal/insertDataDb2NewstabReplica2.json -y " % binPath) query_pid1 = int(subprocess.getstatusoutput('ps aux|grep taosd |grep -v "grep"|awk \'{print $2}\'')[1]) print(query_pid1) tdSql.execute("use db2") diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 832088b2ed6454cfef879c63448798dc02dedec5..e71a25659b1e5a2eed92e615f63eb18ace64de92 100755 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -1 +1 @@ -python3 test.py -f insert/basic.py \ No newline at end of file +python3 test.py -f 1-insert/0-sql/basic.py \ No newline at end of file