test: add insertFromCsvOfLength65500 case for TS-3957

This commit is contained in:
chenhaoran 2023-09-20 14:54:28 +08:00
parent 7f406be8bb
commit 9445fafe47
3 changed files with 89 additions and 9 deletions

View File

@ -32,6 +32,7 @@ class TDTestCase:
tdSql.init(conn.cursor(), logSql)
self.testcasePath = os.path.split(__file__)[0]
self.testcasePath = self.testcasePath.replace('\\', '//')
self.testcaseFilename = os.path.split(__file__)[-1]
os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename))
@ -1263,20 +1264,32 @@ class TDTestCase:
self.ins_query()
def insertFromCsvOfLength65500(self):
tdLog.info('test insert from csv of length 65500')
os.system(f"taosBenchmark -f {self.testcasePath}//tableColumn4096.json")
tdSql.execute(f"insert into db4096.ctb00 file '{self.testcasePath}//tableColumn4096csvLength64k.csv'")
tdSql.query("select count(*) from db4096.ctb00")
tdSql.checkData(0, 0, 1)
tdSql.query("select length(c4092) from db4096.ctb00")
tdSql.checkData(0, 0, 16375)
def run(self):
tdSql.prepare()
startTime_all = time.time()
self.run_8()
self.run_9()
self.run_1()
self.run_2()
# self.run_3()
# self.run_4()
# self.run_5()
# self.run_6()
# self.run_7()
# self.run_8()
# self.run_9()
# self.run_1()
# self.run_2()
# # self.run_3()
# # self.run_4()
# # self.run_5()
# # self.run_6()
# # self.run_7()
self.insertFromCsvOfLength65500()
endTime_all = time.time()
print("total time %ds" % (endTime_all - startTime_all))

View File

@ -0,0 +1,66 @@
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "localhost",
"port": 6030,
"rest_port": 6041,
"user": "root",
"password": "taosdata",
"thread_count": 100,
"create_table_thread_count": 24,
"result_file": "taosBenchmark_result.log",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"num_of_records_per_req": 1000000,
"max_sql_len": 1024000,
"databases": [
{
"dbinfo": {
"name": "db4096",
"drop": "yes",
"replica": 1,
"duration": 10,
"precision": "ms",
"keep": 3650,
"comp": 2,
"vgroups": 2,
"buffer": 1000
},
"super_tables": [
{
"name": "stb0",
"child_table_exists": "no",
"childtable_count": 1,
"childtable_prefix": "ctb0",
"escape_character": "no",
"auto_create_table": "no",
"batch_create_tbl_num": 500,
"data_source": "rand",
"insert_mode": "taosc",
"rollup": null,
"interlace_rows": 0,
"line_protocol": null,
"tcp_transfer": "no",
"insert_rows": 0,
"childtable_limit": 0,
"childtable_offset": 0,
"rows_per_tbl": 0,
"max_sql_len": 1048576,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1000,
"start_timestamp": "2022-10-22 17:20:36",
"sample_format": "csv",
"sample_file": "./sample.csv",
"tags_file": "",
"columns": [{ "type": "INT","count": 4090},{"type": "BINARY","len":16374,"count": 2},{"type": "BINARY","len":16375,"count": 1}],
"tags": [{"type": "TINYINT", "count": 1},{"type": "NCHAR","count": 1}]
}
]
}
],
"prepare_rand": 10000,
"chinese": "no",
"streams": false,
"test_log": "/root/testlog/"
}

File diff suppressed because one or more lines are too long