Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b17fa86e
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看板
提交
b17fa86e
编写于
7月 13, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into feature/stream
上级
8a6e4b87
f9927da4
变更
13
显示空白变更内容
内联
并排
Showing
13 changed file
with
2030 addition
and
2011 deletion
+2030
-2011
tests/system-test/2-query/To_unixtimestamp.py
tests/system-test/2-query/To_unixtimestamp.py
+9
-9
tests/system-test/2-query/arccos.py
tests/system-test/2-query/arccos.py
+46
-46
tests/system-test/2-query/arcsin.py
tests/system-test/2-query/arcsin.py
+45
-45
tests/system-test/2-query/arctan.py
tests/system-test/2-query/arctan.py
+45
-45
tests/system-test/2-query/diff.py
tests/system-test/2-query/diff.py
+2
-2
tests/system-test/2-query/elapsed.py
tests/system-test/2-query/elapsed.py
+1
-1
tests/system-test/2-query/nestedQuery_str.py
tests/system-test/2-query/nestedQuery_str.py
+1750
-1750
tests/system-test/2-query/queryQnode.py
tests/system-test/2-query/queryQnode.py
+27
-27
tests/system-test/2-query/unique.py
tests/system-test/2-query/unique.py
+46
-46
tests/system-test/7-tmq/tmqCommon.py
tests/system-test/7-tmq/tmqCommon.py
+2
-2
tests/system-test/7-tmq/tmqUpdate-1ctb.py
tests/system-test/7-tmq/tmqUpdate-1ctb.py
+7
-7
tests/system-test/7-tmq/tmqUpdate-multiCtb.py
tests/system-test/7-tmq/tmqUpdate-multiCtb.py
+47
-30
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+3
-1
未找到文件。
tests/system-test/2-query/To_unixtimestamp.py
浏览文件 @
b17fa86e
tests/system-test/2-query/arccos.py
浏览文件 @
b17fa86e
tests/system-test/2-query/arcsin.py
浏览文件 @
b17fa86e
tests/system-test/2-query/arctan.py
浏览文件 @
b17fa86e
tests/system-test/2-query/diff.py
浏览文件 @
b17fa86e
tests/system-test/2-query/elapsed.py
浏览文件 @
b17fa86e
tests/system-test/2-query/nestedQuery_str.py
浏览文件 @
b17fa86e
tests/system-test/2-query/queryQnode.py
浏览文件 @
b17fa86e
tests/system-test/2-query/unique.py
浏览文件 @
b17fa86e
tests/system-test/7-tmq/tmqCommon.py
浏览文件 @
b17fa86e
...
@@ -371,7 +371,7 @@ class TMQCom:
...
@@ -371,7 +371,7 @@ class TMQCom:
elif
(
i
%
3
==
0
):
elif
(
i
%
3
==
0
):
tagBinaryValue
=
'changsha'
tagBinaryValue
=
'changsha'
sql
+=
" %s.%s
_
%d using %s.%s tags (%d, %d, %d, '%s', '%s') values "
%
(
dbName
,
ctbPrefix
,
i
+
ctbStartIdx
,
dbName
,
stbName
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
tagBinaryValue
,
tagBinaryValue
)
sql
+=
" %s.%s%d using %s.%s tags (%d, %d, %d, '%s', '%s') values "
%
(
dbName
,
ctbPrefix
,
i
+
ctbStartIdx
,
dbName
,
stbName
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
tagBinaryValue
,
tagBinaryValue
)
for
j
in
range
(
rowsPerTbl
):
for
j
in
range
(
rowsPerTbl
):
sql
+=
"(%d, %d, %d, %d, 'binary_%d', 'nchar_%d', now) "
%
(
startTs
+
j
,
j
,
j
,
j
,
i
+
ctbStartIdx
,
rowsBatched
)
sql
+=
"(%d, %d, %d, %d, 'binary_%d', 'nchar_%d', now) "
%
(
startTs
+
j
,
j
,
j
,
j
,
i
+
ctbStartIdx
,
rowsBatched
)
rowsBatched
+=
1
rowsBatched
+=
1
...
@@ -379,7 +379,7 @@ class TMQCom:
...
@@ -379,7 +379,7 @@ class TMQCom:
tsql
.
execute
(
sql
)
tsql
.
execute
(
sql
)
rowsBatched
=
0
rowsBatched
=
0
if
j
<
rowsPerTbl
-
1
:
if
j
<
rowsPerTbl
-
1
:
sql
=
"insert into %s.%s
_
%d using %s.%s tags (%d, %d, %d, '%s', '%s') values "
%
(
dbName
,
ctbPrefix
,
i
+
ctbStartIdx
,
dbName
,
stbName
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
tagBinaryValue
,
tagBinaryValue
)
sql
=
"insert into %s.%s%d using %s.%s tags (%d, %d, %d, '%s', '%s') values "
%
(
dbName
,
ctbPrefix
,
i
+
ctbStartIdx
,
dbName
,
stbName
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
i
+
ctbStartIdx
,
tagBinaryValue
,
tagBinaryValue
)
else
:
else
:
sql
=
"insert into "
sql
=
"insert into "
#end sql
#end sql
...
...
tests/system-test/7-tmq/tmqUpdate-1ctb.py
浏览文件 @
b17fa86e
...
@@ -17,7 +17,7 @@ from tmqCommon import *
...
@@ -17,7 +17,7 @@ from tmqCommon import *
class
TDTestCase
:
class
TDTestCase
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
snapshot
=
0
self
.
snapshot
=
0
self
.
vgroups
=
2
self
.
vgroups
=
4
self
.
ctbNum
=
1
self
.
ctbNum
=
1
self
.
rowsPerTbl
=
100000
self
.
rowsPerTbl
=
100000
...
@@ -235,18 +235,18 @@ class TDTestCase:
...
@@ -235,18 +235,18 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
prepare
()
self
.
prepareTestEnv
()
#
self.prepareTestEnv()
tdLog
.
printNoPrefix
(
"============================================="
)
#
tdLog.printNoPrefix("=============================================")
tdLog
.
printNoPrefix
(
"======== snapshot is 0: only consume from wal"
)
#
tdLog.printNoPrefix("======== snapshot is 0: only consume from wal")
self
.
tmqCase1
()
#
self.tmqCase1()
self
.
tmqCase2
()
#
self.tmqCase2()
self
.
prepareTestEnv
()
self
.
prepareTestEnv
()
tdLog
.
printNoPrefix
(
"===================================================================="
)
tdLog
.
printNoPrefix
(
"===================================================================="
)
tdLog
.
printNoPrefix
(
"======== snapshot is 1: firstly consume from tsbs, and then from wal"
)
tdLog
.
printNoPrefix
(
"======== snapshot is 1: firstly consume from tsbs, and then from wal"
)
self
.
snapshot
=
1
self
.
snapshot
=
1
self
.
tmqCase1
()
self
.
tmqCase1
()
self
.
tmqCase2
()
#
self.tmqCase2()
def
stop
(
self
):
def
stop
(
self
):
...
...
tests/system-test/7-tmq/tmqUpdate-multiCtb.py
浏览文件 @
b17fa86e
...
@@ -17,9 +17,10 @@ from tmqCommon import *
...
@@ -17,9 +17,10 @@ from tmqCommon import *
class
TDTestCase
:
class
TDTestCase
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
snapshot
=
0
self
.
snapshot
=
0
self
.
vgroups
=
2
self
.
vgroups
=
4
self
.
ctbNum
=
1
self
.
ctbNum
=
100
self
.
rowsPerTbl
=
100000
self
.
rowsPerTbl
=
1000
self
.
autoCtbPrefix
=
'aCtb'
def
init
(
self
,
conn
,
logSql
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
f
"start to excute
{
__file__
}
"
)
tdLog
.
debug
(
f
"start to excute
{
__file__
}
"
)
...
@@ -38,9 +39,9 @@ class TDTestCase:
...
@@ -38,9 +39,9 @@ class TDTestCase:
'tagSchema'
:
[{
'type'
:
'INT'
,
'count'
:
1
},{
'type'
:
'BIGINT'
,
'count'
:
1
},{
'type'
:
'DOUBLE'
,
'count'
:
1
},{
'type'
:
'BINARY'
,
'len'
:
32
,
'count'
:
1
},{
'type'
:
'NCHAR'
,
'len'
:
32
,
'count'
:
1
}],
'tagSchema'
:
[{
'type'
:
'INT'
,
'count'
:
1
},{
'type'
:
'BIGINT'
,
'count'
:
1
},{
'type'
:
'DOUBLE'
,
'count'
:
1
},{
'type'
:
'BINARY'
,
'len'
:
32
,
'count'
:
1
},{
'type'
:
'NCHAR'
,
'len'
:
32
,
'count'
:
1
}],
'ctbPrefix'
:
'ctb'
,
'ctbPrefix'
:
'ctb'
,
'ctbStartIdx'
:
0
,
'ctbStartIdx'
:
0
,
'ctbNum'
:
1
,
'ctbNum'
:
1
000
,
'rowsPerTbl'
:
1000
00
,
'rowsPerTbl'
:
1000
,
'batchNum'
:
1
2
00
,
'batchNum'
:
1
00
00
,
'startTs'
:
1640966400000
,
# 2022-01-01 00:00:00.000
'startTs'
:
1640966400000
,
# 2022-01-01 00:00:00.000
'pollDelay'
:
3
,
'pollDelay'
:
3
,
'showMsg'
:
1
,
'showMsg'
:
1
,
...
@@ -62,9 +63,9 @@ class TDTestCase:
...
@@ -62,9 +63,9 @@ class TDTestCase:
tmqCom
.
insert_data_interlaceByMultiTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
ctbPrefix
=
paraDict
[
"ctbPrefix"
],
tmqCom
.
insert_data_interlaceByMultiTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
ctbPrefix
=
paraDict
[
"ctbPrefix"
],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
# tmqCom.insert_data_with_autoCreateTbl(tsql=tdSql,dbName=paraDict["dbName"],stbName=paraDict["stbName"],ctbPrefix="ctbx"
,
tmqCom
.
insert_data_with_autoCreateTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
],
ctbPrefix
=
self
.
autoCtbPrefix
,
#
ctbNum=paraDict["ctbNum"],rowsPerTbl=paraDict["rowsPerTbl"],batchNum=paraDict["batchNum"],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
#
startTs=paraDict["startTs"],ctbStartIdx=paraDict['ctbStartIdx'])
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
# tdLog.info("restart taosd to ensure that the data falls into the disk")
# tdLog.info("restart taosd to ensure that the data falls into the disk")
# tdSql.query("flush database %s"%(paraDict['dbName']))
# tdSql.query("flush database %s"%(paraDict['dbName']))
...
@@ -84,9 +85,9 @@ class TDTestCase:
...
@@ -84,9 +85,9 @@ class TDTestCase:
'tagSchema'
:
[{
'type'
:
'INT'
,
'count'
:
1
},{
'type'
:
'BIGINT'
,
'count'
:
1
},{
'type'
:
'DOUBLE'
,
'count'
:
1
},{
'type'
:
'BINARY'
,
'len'
:
32
,
'count'
:
1
},{
'type'
:
'NCHAR'
,
'len'
:
32
,
'count'
:
1
}],
'tagSchema'
:
[{
'type'
:
'INT'
,
'count'
:
1
},{
'type'
:
'BIGINT'
,
'count'
:
1
},{
'type'
:
'DOUBLE'
,
'count'
:
1
},{
'type'
:
'BINARY'
,
'len'
:
32
,
'count'
:
1
},{
'type'
:
'NCHAR'
,
'len'
:
32
,
'count'
:
1
}],
'ctbPrefix'
:
'ctb'
,
'ctbPrefix'
:
'ctb'
,
'ctbStartIdx'
:
0
,
'ctbStartIdx'
:
0
,
'ctbNum'
:
1
,
'ctbNum'
:
1
000
,
'rowsPerTbl'
:
1000
00
,
'rowsPerTbl'
:
1000
,
'batchNum'
:
3
000
,
'batchNum'
:
10
000
,
'startTs'
:
1640966400000
,
# 2022-01-01 00:00:00.000
'startTs'
:
1640966400000
,
# 2022-01-01 00:00:00.000
'pollDelay'
:
5
,
'pollDelay'
:
5
,
'showMsg'
:
1
,
'showMsg'
:
1
,
...
@@ -98,10 +99,11 @@ class TDTestCase:
...
@@ -98,10 +99,11 @@ class TDTestCase:
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
# update to half tables
# update to half tables
paraDict
[
'ctbNum'
]
=
int
(
self
.
ctbNum
/
2
)
paraDict
[
'rowsPerTbl'
]
=
int
(
self
.
rowsPerTbl
/
2
)
paraDict
[
'rowsPerTbl'
]
=
int
(
self
.
rowsPerTbl
/
2
)
# tmqCom.insert_data_with_autoCreateTbl(tsql=tdSql,dbName=paraDict["dbName"],stbName=paraDict["stbName"],ctbPrefix="ctbx"
,
tmqCom
.
insert_data_with_autoCreateTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
],
ctbPrefix
=
self
.
autoCtbPrefix
,
#
ctbNum=paraDict["ctbNum"],rowsPerTbl=paraDict["rowsPerTbl"],batchNum=paraDict["batchNum"],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
#
startTs=paraDict["startTs"],ctbStartIdx=paraDict['ctbStartIdx'])
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
tmqCom
.
insert_data_interlaceByMultiTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
ctbPrefix
=
paraDict
[
"ctbPrefix"
],
tmqCom
.
insert_data_interlaceByMultiTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
ctbPrefix
=
paraDict
[
"ctbPrefix"
],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
...
@@ -113,10 +115,14 @@ class TDTestCase:
...
@@ -113,10 +115,14 @@ class TDTestCase:
tdLog
.
info
(
"create topic sql: %s"
%
sqlString
)
tdLog
.
info
(
"create topic sql: %s"
%
sqlString
)
tdSql
.
execute
(
sqlString
)
tdSql
.
execute
(
sqlString
)
#
paraDict['ctbNum'] = self.ctbNum
paraDict
[
'ctbNum'
]
=
self
.
ctbNum
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
consumerId
=
0
consumerId
=
0
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
3
/
2
)
if
self
.
snapshot
==
0
:
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
2
+
1
/
2
*
1
/
2
*
2
))
elif
self
.
snapshot
==
1
:
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
2
))
topicList
=
topicFromStb1
topicList
=
topicFromStb1
ifcheckdata
=
1
ifcheckdata
=
1
ifManualCommit
=
1
ifManualCommit
=
1
...
@@ -129,7 +135,7 @@ class TDTestCase:
...
@@ -129,7 +135,7 @@ class TDTestCase:
tdLog
.
info
(
"start consume processor"
)
tdLog
.
info
(
"start consume processor"
)
tmqCom
.
startTmqSimProcess
(
pollDelay
=
paraDict
[
'pollDelay'
],
dbName
=
paraDict
[
"dbName"
],
showMsg
=
paraDict
[
'showMsg'
],
showRow
=
paraDict
[
'showRow'
],
snapshot
=
paraDict
[
'snapshot'
])
tmqCom
.
startTmqSimProcess
(
pollDelay
=
paraDict
[
'pollDelay'
],
dbName
=
paraDict
[
"dbName"
],
showMsg
=
paraDict
[
'showMsg'
],
showRow
=
paraDict
[
'showRow'
],
snapshot
=
paraDict
[
'snapshot'
])
tdLog
.
info
(
"
insert process end, and
start to check consume result"
)
tdLog
.
info
(
"start to check consume result"
)
expectRows
=
1
expectRows
=
1
resultList
=
tmqCom
.
selectConsumeResult
(
expectRows
)
resultList
=
tmqCom
.
selectConsumeResult
(
expectRows
)
totalConsumeRows
=
0
totalConsumeRows
=
0
...
@@ -143,7 +149,7 @@ class TDTestCase:
...
@@ -143,7 +149,7 @@ class TDTestCase:
if
totalConsumeRows
!=
expectrowcnt
:
if
totalConsumeRows
!=
expectrowcnt
:
tdLog
.
exit
(
"tmq consume rows error!"
)
tdLog
.
exit
(
"tmq consume rows error!"
)
tmqCom
.
checkFileContent
(
consumerId
,
queryString
)
#
tmqCom.checkFileContent(consumerId, queryString)
tdSql
.
query
(
"drop topic %s"
%
topicFromStb1
)
tdSql
.
query
(
"drop topic %s"
%
topicFromStb1
)
tdLog
.
printNoPrefix
(
"======== test case 1 end ...... "
)
tdLog
.
printNoPrefix
(
"======== test case 1 end ...... "
)
...
@@ -161,9 +167,9 @@ class TDTestCase:
...
@@ -161,9 +167,9 @@ class TDTestCase:
'tagSchema'
:
[{
'type'
:
'INT'
,
'count'
:
1
},{
'type'
:
'BIGINT'
,
'count'
:
1
},{
'type'
:
'DOUBLE'
,
'count'
:
1
},{
'type'
:
'BINARY'
,
'len'
:
32
,
'count'
:
1
},{
'type'
:
'NCHAR'
,
'len'
:
32
,
'count'
:
1
}],
'tagSchema'
:
[{
'type'
:
'INT'
,
'count'
:
1
},{
'type'
:
'BIGINT'
,
'count'
:
1
},{
'type'
:
'DOUBLE'
,
'count'
:
1
},{
'type'
:
'BINARY'
,
'len'
:
32
,
'count'
:
1
},{
'type'
:
'NCHAR'
,
'len'
:
32
,
'count'
:
1
}],
'ctbPrefix'
:
'ctb'
,
'ctbPrefix'
:
'ctb'
,
'ctbStartIdx'
:
0
,
'ctbStartIdx'
:
0
,
'ctbNum'
:
1
,
'ctbNum'
:
1
000
,
'rowsPerTbl'
:
1000
0
,
'rowsPerTbl'
:
1000
,
'batchNum'
:
5
000
,
'batchNum'
:
10
000
,
'startTs'
:
1640966400000
,
# 2022-01-01 00:00:00.000
'startTs'
:
1640966400000
,
# 2022-01-01 00:00:00.000
'pollDelay'
:
5
,
'pollDelay'
:
5
,
'showMsg'
:
1
,
'showMsg'
:
1
,
...
@@ -179,14 +185,20 @@ class TDTestCase:
...
@@ -179,14 +185,20 @@ class TDTestCase:
tdSql
.
query
(
"flush database %s"
%
(
paraDict
[
'dbName'
]))
tdSql
.
query
(
"flush database %s"
%
(
paraDict
[
'dbName'
]))
# update to half tables
# update to half tables
paraDict
[
'
startTs'
]
=
paraDict
[
'startTs'
]
+
int
(
self
.
rowsPerTbl
/
2
)
paraDict
[
'
ctbNum'
]
=
int
(
self
.
ctbNum
/
2
)
paraDict
[
'rowsPerTbl'
]
=
int
(
self
.
rowsPerTbl
/
2
)
paraDict
[
'rowsPerTbl'
]
=
int
(
self
.
rowsPerTbl
/
2
)
tmqCom
.
insert_data_with_autoCreateTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
],
ctbPrefix
=
paraDict
[
"ctbPrefix"
],
paraDict
[
'startTs'
]
=
paraDict
[
'startTs'
]
+
int
(
self
.
rowsPerTbl
/
2
)
tmqCom
.
insert_data_with_autoCreateTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
],
ctbPrefix
=
self
.
autoCtbPrefix
,
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
])
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
]
+
int
(
self
.
ctbNum
/
2
))
# tmqCom.insert_data_interlaceByMultiTbl(tsql=tdSql,dbName=paraDict["dbName"],ctbPrefix=paraDict["ctbPrefix"],
# ctbNum=paraDict["ctbNum"],rowsPerTbl=paraDict["rowsPerTbl"],batchNum=paraDict["batchNum"],
tmqCom
.
insert_data_with_autoCreateTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
],
ctbPrefix
=
"aCtby"
,
# startTs=paraDict["startTs"],ctbStartIdx=paraDict['ctbStartIdx'])
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
]
+
int
(
self
.
ctbNum
/
2
))
tmqCom
.
insert_data_interlaceByMultiTbl
(
tsql
=
tdSql
,
dbName
=
paraDict
[
"dbName"
],
ctbPrefix
=
paraDict
[
"ctbPrefix"
],
ctbNum
=
paraDict
[
"ctbNum"
],
rowsPerTbl
=
paraDict
[
"rowsPerTbl"
],
batchNum
=
paraDict
[
"batchNum"
],
startTs
=
paraDict
[
"startTs"
],
ctbStartIdx
=
paraDict
[
'ctbStartIdx'
]
+
int
(
self
.
ctbNum
/
2
))
tmqCom
.
initConsumerTable
()
tmqCom
.
initConsumerTable
()
tdLog
.
info
(
"create topics from stb1"
)
tdLog
.
info
(
"create topics from stb1"
)
...
@@ -197,9 +209,14 @@ class TDTestCase:
...
@@ -197,9 +209,14 @@ class TDTestCase:
tdSql
.
execute
(
sqlString
)
tdSql
.
execute
(
sqlString
)
# paraDict['ctbNum'] = self.ctbNum
# paraDict['ctbNum'] = self.ctbNum
paraDict
[
'ctbNum'
]
=
self
.
ctbNum
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
consumerId
=
1
consumerId
=
1
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
2
)
if
self
.
snapshot
==
0
:
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
2
+
1
/
2
*
1
/
2
*
2
+
1
/
2
*
1
/
2
))
elif
self
.
snapshot
==
1
:
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
2
+
1
/
2
*
1
/
2
))
topicList
=
topicFromStb1
topicList
=
topicFromStb1
ifcheckdata
=
1
ifcheckdata
=
1
ifManualCommit
=
1
ifManualCommit
=
1
...
@@ -212,7 +229,7 @@ class TDTestCase:
...
@@ -212,7 +229,7 @@ class TDTestCase:
tdLog
.
info
(
"start consume processor"
)
tdLog
.
info
(
"start consume processor"
)
tmqCom
.
startTmqSimProcess
(
pollDelay
=
paraDict
[
'pollDelay'
],
dbName
=
paraDict
[
"dbName"
],
showMsg
=
paraDict
[
'showMsg'
],
showRow
=
paraDict
[
'showRow'
],
snapshot
=
paraDict
[
'snapshot'
])
tmqCom
.
startTmqSimProcess
(
pollDelay
=
paraDict
[
'pollDelay'
],
dbName
=
paraDict
[
"dbName"
],
showMsg
=
paraDict
[
'showMsg'
],
showRow
=
paraDict
[
'showRow'
],
snapshot
=
paraDict
[
'snapshot'
])
tdLog
.
info
(
"
insert process end, and
start to check consume result"
)
tdLog
.
info
(
"start to check consume result"
)
expectRows
=
1
expectRows
=
1
resultList
=
tmqCom
.
selectConsumeResult
(
expectRows
)
resultList
=
tmqCom
.
selectConsumeResult
(
expectRows
)
totalConsumeRows
=
0
totalConsumeRows
=
0
...
...
tests/system-test/fulltest.sh
浏览文件 @
b17fa86e
...
@@ -178,6 +178,8 @@ python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py
...
@@ -178,6 +178,8 @@ python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py
python3 ./test.py
-f
7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py
python3 ./test.py
-f
7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py
python3 ./test.py
-f
7-tmq/tmqAutoCreateTbl.py
python3 ./test.py
-f
7-tmq/tmqAutoCreateTbl.py
#python3 ./test.py -f 7-tmq/tmqDnodeRestart.py
#python3 ./test.py -f 7-tmq/tmqDnodeRestart.py
#python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py
python3 ./test.py
-f
7-tmq/tmqUpdate-multiCtb.py
#------------querPolicy 2-----------
#------------querPolicy 2-----------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录