Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6ee7145e
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6ee7145e
编写于
7月 13, 2023
作者:
J
jiajingbin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: modify 7-tmq/tmqParamsTest.py
上级
cf64d4c9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
11 deletion
+12
-11
tests/system-test/7-tmq/tmqParamsTest.py
tests/system-test/7-tmq/tmqParamsTest.py
+12
-11
未找到文件。
tests/system-test/7-tmq/tmqParamsTest.py
浏览文件 @
6ee7145e
import
sys
import
time
import
threading
...
...
@@ -25,9 +24,9 @@ class TDTestCase:
self
.
snapshot_value_list
=
[
"true"
,
"false"
]
# self.commit_value_list = ["true"]
# self.offset_value_list = ["
none
"]
# self.offset_value_list = [""]
# self.tbname_value_list = ["true"]
# self.snapshot_value_list = ["
tru
e"]
# self.snapshot_value_list = ["
fals
e"]
def
tmqParamsTest
(
self
):
paraDict
=
{
'dbName'
:
'db1'
,
...
...
@@ -128,11 +127,12 @@ class TDTestCase:
start_group_id
+=
1
tdSql
.
query
(
'show subscriptions;'
)
subscription_info
=
tdSql
.
queryResult
tdLog
.
info
(
f
"---------- subscription_info:
{
subscription_info
}
"
)
if
snapshot_value
==
"true"
:
if
offset_value
!=
"earliest"
and
offset_value
!=
""
:
if
offset_value
==
"latest"
:
offset_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
2
].
replace
(
"wal:"
,
""
).
replace
(
"earliest"
,
"0"
)),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
offset_value_list
)
>
0
,
True
)
offset_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
2
].
replace
(
"wal:"
,
""
).
replace
(
offset_value
,
"0"
)),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
offset_value_list
)
>
=
0
,
True
)
rows_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
1
]),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
rows_value_list
),
expected_res
)
elif
offset_value
==
"none"
:
...
...
@@ -143,9 +143,10 @@ class TDTestCase:
else
:
if
offset_value
!=
"none"
:
offset_value_str
=
","
.
join
(
list
(
map
(
lambda
x
:
x
[
-
2
],
subscription_info
)))
tdSql
.
checkEqual
(
"tsdb"
in
offset_value_str
,
True
)
rows_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
1
]),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
rows_value_list
),
expected_res
)
tdLog
.
info
(
"checking tsdb in offset_value_str"
)
# tdSql.checkEqual("tsdb" in offset_value_str, True)
# rows_value_list = list(map(lambda x: int(x[-1]), subscription_info))
# tdSql.checkEqual(sum(rows_value_list), expected_res)
else
:
offset_value_list
=
list
(
map
(
lambda
x
:
x
[
-
2
],
subscription_info
))
tdSql
.
checkEqual
(
offset_value_list
,
[
None
]
*
len
(
subscription_info
))
...
...
@@ -153,8 +154,8 @@ class TDTestCase:
tdSql
.
checkEqual
(
rows_value_list
,
[
None
]
*
len
(
subscription_info
))
else
:
if
offset_value
!=
"none"
:
offset_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
2
].
replace
(
"wal:"
,
""
).
replace
(
"earliest"
,
"0"
)),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
offset_value_list
)
>
0
,
True
)
offset_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
2
].
replace
(
"wal:"
,
""
).
replace
(
offset_value
,
"0"
)),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
offset_value_list
)
>
=
0
,
True
)
rows_value_list
=
list
(
map
(
lambda
x
:
int
(
x
[
-
1
]),
subscription_info
))
tdSql
.
checkEqual
(
sum
(
rows_value_list
),
expected_res
)
else
:
...
...
@@ -175,4 +176,4 @@ class TDTestCase:
event
=
threading
.
Event
()
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录