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

test:modify testcase of python connector using Statement API

上级 78306757
{
"filetype": "insert",
"cfgdir": "/etc/taos/",
"host": "test216",
"port": 6030,
"user": "root",
"password": "taosdata",
"thread_count": 8,
"thread_count_create_tbl": 8,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 1000,
"num_of_records_per_req": 100000,
"databases": [
{
"dbinfo": {
"name": "db",
"drop": "yes",
"vgroups": 24
},
"super_tables": [
{
"name": "stb",
"child_table_exists": "no",
"childtable_count": 100000,
"childtable_prefix": "stb_",
"auto_create_table": "no",
"batch_create_tbl_num": 50000,
"data_source": "rand",
"insert_mode": "taosc",
"insert_rows": 5,
"interlace_rows": 100000,
"insert_interval": 0,
"max_sql_len": 10000000,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 10,
"start_timestamp": "2022-05-01 00:00:00.000",
"sample_format": "csv",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "INT"
},
{
"type": "TINYINT",
"count": 1
},
{"type": "DOUBLE"},
{
"type": "BINARY",
"len": 40,
"count": 1
},
{
"type": "nchar",
"len": 20,
"count": 1
}
],
"tags": [
{
"type": "TINYINT",
"count": 1
},
{
"type": "BINARY",
"len": 16,
"count": 1
}
]
}
]
}
]
}
\ No newline at end of file
{
"filetype": "query",
"cfgdir": "/etc/taos",
"host": "test216",
"port": 6030,
"user": "root",
"password": "taosdata",
"confirm_parameter_prompt": "no",
"databases": "db",
"query_times": 100,
"query_mode": "taosc",
"specified_table_query": {
"query_interval": 0,
"threads": 8,
"sqls": [
{
"sql": "select count(*) from stb_0 ",
"result": "./query_res0.txt"
},
{
"sql": "select last_row(*) from stb_1 ",
"result": "./query_res1.txt"
},
{
"sql": "select last(*) from stb_2 ",
"result": "./query_res2.txt"
},
{
"sql": "select first(*) from stb_3 ",
"result": "./query_res3.txt"
},
{
"sql": "select avg(c0),min(c2),max(c1) from stb_4",
"result": "./query_res4.txt"
},
{
"sql": "select avg(c0),min(c2),max(c1) from stb_5 where ts <= '2022-05-01 20:00:00.500' and ts >= '2022-05-01 00:00:00.000' ",
"result": "./query_res5.txt"
}
]
}
}
\ No newline at end of file
......@@ -132,11 +132,11 @@ class TDTestCase:
querystmt.bind_param(queryparam)
querystmt.execute()
result=querystmt.use_result()
rows=result.fetch_all()
print( querystmt.use_result())
# rows=result.fetch_all()
# print( querystmt.use_result())
# result = conn.query("select * from log")
# rows=result.fetch_all()
rows=result.fetch_all()
# rows=result.fetch_all()
print(rows)
assert rows[1][0] == "ts"
......@@ -247,10 +247,9 @@ class TDTestCase:
config = buildPath+ "../sim/dnode1/cfg/"
host="localhost"
connectstmt=self.newcon(host,config)
print(connectstmt)
self.test_stmt_insert_multi(connectstmt)
connectstmt=self.newcon(host,config)
self.test_stmt_set_tbname_tag(connectstmt)
# connectstmt=self.newcon(host,config)
# self.test_stmt_set_tbname_tag(connectstmt)
return
......
......@@ -15,6 +15,7 @@ python3 ./test.py -f 0-others/user_control.py
python3 ./test.py -f 0-others/fsync.py
python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py
python3 ./test.py -f 1-insert/test_stmt_insert_query.py
python3 ./test.py -f 2-query/between.py
python3 ./test.py -f 2-query/distinct.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册