Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bfca29a2
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看板
未验证
提交
bfca29a2
编写于
12月 28, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
12月 28, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19193 from taosdata/test/TD-19796
test: add test case for tmq replica 3
上级
d731d360
d9490085
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
9 deletion
+16
-9
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+2
-2
tests/system-test/7-tmq/subscribeDb.py
tests/system-test/7-tmq/subscribeDb.py
+8
-4
tests/system-test/7-tmq/subscribeDb0.py
tests/system-test/7-tmq/subscribeDb0.py
+5
-2
tests/system-test/7-tmq/tmqCommon.py
tests/system-test/7-tmq/tmqCommon.py
+1
-1
未找到文件。
tests/parallel_test/cases.task
浏览文件 @
bfca29a2
...
...
@@ -677,8 +677,8 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/basic5.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb.py
-N 3 -n 3
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb0.py
-N 3 -n 3
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb1.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb2.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/subscribeDb3.py
...
...
tests/system-test/7-tmq/subscribeDb.py
浏览文件 @
bfca29a2
...
...
@@ -61,7 +61,7 @@ class TDTestCase:
def
insertConsumerInfo
(
self
,
consumerId
,
expectrowcnt
,
topicList
,
keyList
,
ifcheckdata
,
ifmanualcommit
,
cdbName
=
'cdb'
):
sql
=
"insert into %s.consumeinfo values "
%
cdbName
sql
+=
"(now
, %d, '%s', '%s', %d, %d, %d)"
%
(
consumerId
,
topicList
,
keyList
,
expectrowcnt
,
ifcheckdata
,
ifmanualcommit
)
sql
+=
"(now
+ %ds, %d, '%s', '%s', %d, %d, %d)"
%
(
consumerId
,
consumerId
,
topicList
,
keyList
,
expectrowcnt
,
ifcheckdata
,
ifmanualcommit
)
tdLog
.
info
(
"consume info sql: %s"
%
sql
)
tdSql
.
query
(
sql
)
...
...
@@ -174,12 +174,13 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
self
.
initConsumerTable
()
tdSql
.
execute
(
"create database if not exists %s vgroups %d
"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups
'
]))
tdSql
.
execute
(
"create database if not exists %s vgroups %d
replica %d"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups'
],
parameterDict
[
'replica
'
]))
prepareEnvThread
=
threading
.
Thread
(
target
=
self
.
prepareEnv
,
kwargs
=
parameterDict
)
prepareEnvThread
.
start
()
...
...
@@ -271,12 +272,13 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
self
.
initConsumerTable
()
tdSql
.
execute
(
"create database if not exists %s vgroups %d
"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups
'
]))
tdSql
.
execute
(
"create database if not exists %s vgroups %d
replica %d"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups'
],
parameterDict
[
'replica
'
]))
prepareEnvThread
=
threading
.
Thread
(
target
=
self
.
prepareEnv
,
kwargs
=
parameterDict
)
prepareEnvThread
.
start
()
...
...
@@ -337,6 +339,7 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
...
...
@@ -406,12 +409,13 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
self
.
initConsumerTable
()
tdSql
.
execute
(
"create database if not exists %s vgroups %d
"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups
'
]))
tdSql
.
execute
(
"create database if not exists %s vgroups %d
replica %d"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups'
],
parameterDict
[
'replica
'
]))
prepareEnvThread
=
threading
.
Thread
(
target
=
self
.
prepareEnv
,
kwargs
=
parameterDict
)
prepareEnvThread
.
start
()
...
...
tests/system-test/7-tmq/subscribeDb0.py
浏览文件 @
bfca29a2
...
...
@@ -174,12 +174,13 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
self
.
initConsumerTable
()
tdSql
.
execute
(
"create database if not exists %s vgroups %d
"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups
'
]))
tdSql
.
execute
(
"create database if not exists %s vgroups %d
replica %d"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups'
],
parameterDict
[
'replica
'
]))
prepareEnvThread
=
threading
.
Thread
(
target
=
self
.
prepareEnv
,
kwargs
=
parameterDict
)
prepareEnvThread
.
start
()
...
...
@@ -191,6 +192,7 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
...
...
@@ -254,12 +256,13 @@ class TDTestCase:
'ctbNum'
:
10
,
\
'rowsPerTbl'
:
5000
,
\
'batchNum'
:
100
,
\
'replica'
:
self
.
replicaVar
,
\
'startTs'
:
1640966400000
}
# 2022-01-01 00:00:00.000
parameterDict
[
'cfg'
]
=
cfgPath
self
.
initConsumerTable
()
tdSql
.
execute
(
"create database if not exists %s vgroups %d
"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups
'
]))
tdSql
.
execute
(
"create database if not exists %s vgroups %d
replica %d"
%
(
parameterDict
[
'dbName'
],
parameterDict
[
'vgroups'
],
parameterDict
[
'replica
'
]))
prepareEnvThread
=
threading
.
Thread
(
target
=
self
.
prepareEnv
,
kwargs
=
parameterDict
)
prepareEnvThread
.
start
()
...
...
tests/system-test/7-tmq/tmqCommon.py
浏览文件 @
bfca29a2
...
...
@@ -60,7 +60,7 @@ class TMQCom:
def
insertConsumerInfo
(
self
,
consumerId
,
expectrowcnt
,
topicList
,
keyList
,
ifcheckdata
,
ifmanualcommit
,
cdbName
=
'cdb'
):
sql
=
"insert into %s.consumeinfo values "
%
cdbName
sql
+=
"(now
, %d, '%s', '%s', %d, %d, %d)"
%
(
consumerId
,
topicList
,
keyList
,
expectrowcnt
,
ifcheckdata
,
ifmanualcommit
)
sql
+=
"(now
+ %ds, %d, '%s', '%s', %d, %d, %d)"
%
(
consumerId
,
consumerId
,
topicList
,
keyList
,
expectrowcnt
,
ifcheckdata
,
ifmanualcommit
)
tdLog
.
info
(
"consume info sql: %s"
%
sql
)
tdSql
.
query
(
sql
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录