提交 8470f098 编写于 作者: haoranc's avatar haoranc

[TD-4238]<test>: add taodemo-testcase that records of number in request sql less than 32767

上级 a36daff5
......@@ -35,7 +35,7 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 1000,
"childtable_count": 100,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
......@@ -56,6 +56,31 @@
"tags_file": "",
"columns": [{"type": "TINYINT", "count":1}],
"tags": [{"type": "TINYINT", "count":1}]
},
{
"name": "stb1",
"child_table_exists":"no",
"childtable_count": 100,
"childtable_prefix": "stb01_",
"auto_create_table": "no",
"batch_create_tbl_num": 100,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows":50000,
"childtable_limit": -1,
"childtable_offset":0,
"interlace_rows": 32767,
"insert_interval":0,
"max_sql_len": 1025000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "2012-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{"type": "TINYINT", "count":1}],
"tags": [{"type": "TINYINT", "count":1}]
}]
}]
}
......@@ -35,13 +35,13 @@
"super_tables": [{
"name": "stb0",
"child_table_exists":"no",
"childtable_count": 100,
"childtable_count": 150,
"childtable_prefix": "stb00_",
"auto_create_table": "no",
"batch_create_tbl_num": 1000,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 20,
"insert_rows": 10,
"childtable_limit": 0,
"childtable_offset": 0,
"interlace_rows": 0,
......
{
"filetype":"subscribe",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"databases": "db",
"confirm_parameter_prompt": "no",
"specified_table_query":
{
"concurrent":2,
"mode":"sync",
"interval":1000,
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from stb0",
"result": "./subscribe_res0.txt"
}]
},
"super_table_query":
{
"stblname": "stb0",
"threads":2,
"mode":"sync",
"interval":0,
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"result": "./subscribe_res2.txt"
}]
}
}
\ No newline at end of file
{
"filetype":"subscribe",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"databases": "db",
"confirm_parameter_prompt": "no",
"specified_table_query":
{
"concurrent":2,
"mode":"sync",
"interval":0,
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from stb00_0",
"result": "./subscribe_res1.txt"
},
{
"sql": "select * from stb00_1",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_2",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_3",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_4",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_5",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_6",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_7",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_8",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_9",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_10 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_11 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_12 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_13 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_14 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_15 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_16 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_17 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_18 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_19 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_20 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_21 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_22 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_23 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_24 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_25 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_26 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_27 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_28 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_29 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_30 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_31 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_32 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_33 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_34 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_35 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_36 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_37 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_38 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_39 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_40 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_41 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_42 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_43 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_44 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_45 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_46 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_47 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_48 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_49 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_50 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_51 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_52 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_53 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_54 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_55 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_56 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_57 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_58 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_59 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_60",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_61",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_62",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_63",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_64",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_65",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_66",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_67",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_68",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_69",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_70 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_71 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_72 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_73 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_74 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_75 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_76 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_77 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_78 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_79 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_80 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_81 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_82 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_83 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_84 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_85 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_86 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_87 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_88 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_89 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_90 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_91 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_92 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_93 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_94 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_95 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_96 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_97 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_98 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_99 ",
"result": "./subscribe_res0.txt"
},
{
"sql": "select * from stb00_99 ",
"result": "./subscribe_res0.txt"
}]
},
"super_table_query":
{
"stblname": "stb0",
"threads":2,
"mode":"sync",
"interval":0,
"restart":"no",
"keepProgress":"no",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"result": "./subscribe_res2.txt"
}]
}
}
\ No newline at end of file
......@@ -17,11 +17,11 @@
"keepProgress":"no",
"sqls": [
{
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:01.000' ",
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ",
"result": "./subscribe_res2.txt"
},
{
"sql": "select * from xxxx where ts > '2021-02-25 10:00:04.000' ",
"sql": "select * from xxxx where ts >= '2021-02-25 10:00:00.000' ",
"result": "./subscribe_res3.txt"
}]
}
......
......@@ -224,6 +224,9 @@ class TDTestCase:
os.system("%staosdemo -f tools/taosdemoAllTest/insertMaxNumPerReq.json -y " % binPath)
tdSql.execute("use db")
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 5000000)
tdSql.query("select count(*) from stb0")
tdSql.checkData(0, 0, 5000000)
......
......@@ -111,9 +111,30 @@ class TDTestCase:
# os.system("rm -rf ./subscribe_res*")
# os.system("rm -rf ./all_subscribe*")
# query times less than or equal to 100
# sql number lager 100
os.system("%staosdemo -f tools/taosdemoAllTest/subInsertdataMaxsql100.json" % binPath)
os.system("%staosdemo -f tools/taosdemoAllTest/subSyncMaxsql100.json" % binPath)
# assert os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSpecMaxsql100.json" % binPath) !=0
os.system("%staosdemo -f tools/taosdemoAllTest/subSyncSuperMaxsql100.json" % binPath)
# # # merge result files
# 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")
# # os.system("cat subscribe_res3.txt* > all_subscribe_res3.txt")
# sleep(3)
# # correct subscribeTimes testcase
# subTimes0 = self.subTimes("all_subscribe_res0.txt")
# self.assertCheck("all_subscribe_res0.txt",subTimes0 ,3960)
# subTimes1 = self.subTimes("all_subscribe_res1.txt")
# self.assertCheck("all_subscribe_res1.txt",subTimes1 ,40)
# subTimes2 = self.subTimes("all_subscribe_res2.txt")
# 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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册