Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4d99188e
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4d99188e
编写于
7月 10, 2022
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test:modify testcase of qnode
上级
dd6b5100
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
28 deletion
+36
-28
tests/pytest/util/cluster.py
tests/pytest/util/cluster.py
+3
-2
tests/system-test/2-query/queryQnode.py
tests/system-test/2-query/queryQnode.py
+11
-18
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+3
-3
tests/system-test/test.py
tests/system-test/test.py
+19
-5
未找到文件。
tests/pytest/util/cluster.py
浏览文件 @
4d99188e
...
...
@@ -58,9 +58,10 @@ class ConfigureyCluster:
self
.
dnodes
.
append
(
dnode
)
return
self
.
dnodes
def
create_dnode
(
self
,
conn
):
def
create_dnode
(
self
,
conn
,
dnodeNum
):
tdSql
.
init
(
conn
.
cursor
())
for
dnode
in
self
.
dnodes
[
1
:]:
dnodeNum
=
int
(
dnodeNum
)
for
dnode
in
self
.
dnodes
[
1
:
dnodeNum
]:
# print(dnode.cfgDict)
dnode_id
=
dnode
.
cfgDict
[
"fqdn"
]
+
":"
+
dnode
.
cfgDict
[
"serverPort"
]
tdSql
.
execute
(
" create dnode '%s';"
%
dnode_id
)
...
...
tests/system-test/2-query/queryQnode.py
浏览文件 @
4d99188e
...
...
@@ -278,22 +278,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
rowsPerSTable
)
return
# test case1 base
def
test_case1
(
self
):
#stableCount=threadNumbersCtb
parameterDict
=
{
'vgroups'
:
1
,
\
'threadNumbersCtb'
:
5
,
\
'threadNumbersIda'
:
5
,
\
'stableCount'
:
5
,
\
'tablesPerStb'
:
50
,
\
'rowsPerTable'
:
10
,
\
'dbname'
:
'db'
,
\
'stbname'
:
'stb'
,
\
'host'
:
'localhost'
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
tdLog
.
debug
(
"-----create database and muti-thread create tables test------- "
)
# test case : Switch back and forth among the three queryPolicy(1\2\3)
def
test_case1
(
self
):
self
.
taosBenchCreate
(
"127.0.0.1"
,
"no"
,
"db1"
,
"stb1"
,
1
,
2
,
1
*
10
)
tdSql
.
execute
(
"use db1;"
)
...
...
@@ -407,6 +392,7 @@ class TDTestCase:
tdSql
.
query
(
"select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;"
)
assert
unionallQnode
==
tdSql
.
queryResult
# test case : queryPolicy = 2
def
test_case2
(
self
):
self
.
taosBenchCreate
(
"127.0.0.1"
,
"no"
,
"db1"
,
"stb1"
,
10
,
2
,
1
*
10
)
tdSql
.
query
(
"show qnodes"
)
...
...
@@ -438,8 +424,9 @@ class TDTestCase:
tdSql
.
query
(
"select max(c1) from stb10_0;"
)
tdSql
.
query
(
"select min(c1) from stb11_0;"
)
def
test_case3
(
self
):
# test case : queryPolicy = 3
def
test_case3
(
self
):
tdSql
.
execute
(
'alter local "queryPolicy" "3"'
)
tdLog
.
debug
(
"create qnode on dnode 1"
)
tdSql
.
execute
(
"create qnode on dnode 1"
)
...
...
@@ -472,10 +459,16 @@ class TDTestCase:
# run case
def
run
(
self
):
# test qnode
tdLog
.
debug
(
" test_case1 ............ [start]"
)
self
.
test_case1
()
tdLog
.
debug
(
" test_case1 ............ [OK]"
)
tdLog
.
debug
(
" test_case2 ............ [start]"
)
self
.
test_case2
()
tdLog
.
debug
(
" test_case2 ............ [OK]"
)
tdLog
.
debug
(
" test_case3 ............ [start]"
)
self
.
test_case3
()
tdLog
.
debug
(
" test_case3 ............ [OK]"
)
# tdLog.debug(" LIMIT test_case3 ............ [OK]")
def
stop
(
self
):
...
...
tests/system-test/fulltest.sh
浏览文件 @
4d99188e
...
...
@@ -120,12 +120,12 @@ python3 ./test.py -f 2-query/irate.py
python3 ./test.py
-f
2-query/and_or_for_byte.py
python3 ./test.py
-f
2-query/function_null.py
python3 ./test.py
-f
2-query/queryQnode.py
#
python3 ./test.py -f 2-query/queryQnode.py
python3 ./test.py
-f
6-cluster/5dnode1mnode.py
#python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5 -M 3
#
BUG
python3 ./test.py -f 6-cluster/5dnode2mnode.py -N 5 -M 3
#python3 ./test.py -f 6-cluster/5dnode3mnodeStop.py -N 5 -M 3
#
python3 ./test.py -f 6-cluster/5dnode3mnodeStopLoop.py -N 5 -M 3
python3 ./test.py
-f
6-cluster/5dnode3mnodeStopLoop.py
-N
5
-M
3
# BUG python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py -N 5 -M 3
# BUG python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 5 -M 3
python3 ./test.py
-f
6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py
-N
5
-M
3
...
...
tests/system-test/test.py
浏览文件 @
4d99188e
...
...
@@ -64,8 +64,9 @@ if __name__ == "__main__":
updateCfgDict
=
{}
execCmd
=
""
queryPolicy
=
1
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghrd:k:e:N:M:Q:'
,
[
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'restart'
,
'updateCfgDict'
,
'killv'
,
'execCmd'
,
'dnodeNums'
,
'mnodeNums'
,
'queryPolicy'
])
createDnodeNums
=
1
opts
,
args
=
getopt
.
gnu_getopt
(
sys
.
argv
[
1
:],
'f:p:m:l:scghrd:k:e:N:M:Q:C:'
,
[
'file='
,
'path='
,
'master'
,
'logSql'
,
'stop'
,
'cluster'
,
'valgrind'
,
'help'
,
'restart'
,
'updateCfgDict'
,
'killv'
,
'execCmd'
,
'dnodeNums'
,
'mnodeNums'
,
'queryPolicy'
,
'createDnodeNums'
])
for
key
,
value
in
opts
:
if
key
in
[
'-h'
,
'--help'
]:
tdLog
.
printNoPrefix
(
...
...
@@ -81,9 +82,11 @@ if __name__ == "__main__":
tdLog
.
printNoPrefix
(
'-d update cfg dict, base64 json str'
)
tdLog
.
printNoPrefix
(
'-k not kill valgrind processer'
)
tdLog
.
printNoPrefix
(
'-e eval str to run'
)
tdLog
.
printNoPrefix
(
'-N
create
dnodes numbers in clusters'
)
tdLog
.
printNoPrefix
(
'-N
start
dnodes numbers in clusters'
)
tdLog
.
printNoPrefix
(
'-M create mnode numbers in clusters'
)
tdLog
.
printNoPrefix
(
'-Q set queryPolicy in one dnode'
)
tdLog
.
printNoPrefix
(
'-C create Dnode Numbers in one cluster'
)
sys
.
exit
(
0
)
...
...
@@ -143,6 +146,9 @@ if __name__ == "__main__":
if
key
in
[
'-Q'
,
'--queryPolicy'
]:
queryPolicy
=
value
if
key
in
[
'-C'
,
'--createDnodeNums'
]:
createDnodeNums
=
value
if
not
execCmd
==
""
:
tdDnodes
.
init
(
deployPath
)
print
(
execCmd
)
...
...
@@ -239,7 +245,11 @@ if __name__ == "__main__":
host
,
config
=
tdDnodes
.
getSimCfgPath
())
print
(
tdDnodes
.
getSimCfgPath
(),
host
)
cluster
.
create_dnode
(
conn
)
if
createDnodeNums
==
1
:
createDnodeNums
=
dnodeNums
else
:
createDnodeNums
=
createDnodeNums
cluster
.
create_dnode
(
conn
,
createDnodeNums
)
try
:
if
cluster
.
check_dnode
(
conn
)
:
print
(
"check dnode ready"
)
...
...
@@ -314,7 +324,11 @@ if __name__ == "__main__":
host
,
config
=
tdDnodes
.
getSimCfgPath
())
print
(
tdDnodes
.
getSimCfgPath
(),
host
)
cluster
.
create_dnode
(
conn
)
if
createDnodeNums
==
1
:
createDnodeNums
=
dnodeNums
else
:
createDnodeNums
=
createDnodeNums
cluster
.
create_dnode
(
conn
,
createDnodeNums
)
try
:
if
cluster
.
check_dnode
(
conn
)
:
print
(
"check dnode ready"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录