Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bad2bb52
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
bad2bb52
编写于
8月 16, 2023
作者:
B
Benguang Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: update test cases for show vnodes
上级
80518cf8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
17 deletion
+21
-17
source/libs/parser/test/parShowToUse.cpp
source/libs/parser/test/parShowToUse.cpp
+2
-2
tests/script/tsim/db/basic1.sim
tests/script/tsim/db/basic1.sim
+18
-14
tests/system-test/0-others/show.py
tests/system-test/0-others/show.py
+1
-1
未找到文件。
source/libs/parser/test/parShowToUse.cpp
浏览文件 @
bad2bb52
...
@@ -239,9 +239,9 @@ TEST_F(ParserShowToUseTest, showVgroups) {
...
@@ -239,9 +239,9 @@ TEST_F(ParserShowToUseTest, showVgroups) {
TEST_F
(
ParserShowToUseTest
,
showVnodes
)
{
TEST_F
(
ParserShowToUseTest
,
showVnodes
)
{
useDb
(
"root"
,
"test"
);
useDb
(
"root"
,
"test"
);
run
(
"SHOW VNODES 1"
);
run
(
"SHOW VNODES
ON DNODE
1"
);
run
(
"SHOW VNODES
'node1:7030'
"
);
run
(
"SHOW VNODES"
);
}
}
TEST_F
(
ParserShowToUseTest
,
splitVgroup
)
{
TEST_F
(
ParserShowToUseTest
,
splitVgroup
)
{
...
...
tests/script/tsim/db/basic1.sim
浏览文件 @
bad2bb52
...
@@ -107,35 +107,39 @@ if $data30 != 12 then
...
@@ -107,35 +107,39 @@ if $data30 != 12 then
return -1
return -1
endi
endi
print =============== show vnodes
print =============== show vnodes
on dnode 1
sql show vnodes 1
sql show vnodes
on dnode
1
if $rows != 9 then
if $rows != 9 then
return -1
return -1
endi
endi
if $data
(4)[1]
!= 1 then
if $data
10
!= 1 then
return -1
return -1
endi
endi
if $data
(4)[2] != leader
then
if $data
11 != 5
then
return -1
return -1
endi
endi
if $data
(4)[3]
!= d2 then
if $data
12
!= d2 then
return -1
return -1
endi
endi
if $data
(4)[4] != 1
then
if $data
13 != leader
then
return -1
return -1
endi
endi
if $data(4)[5] != localhost:7100 then
print $data14
return -1
print $data15
if $data16 != 1 then
return -1
endi
endi
sql show vnodes 'localhost:7100'
print ================ show vnodes
sql show vnodes
if $rows != 9 then
if $rows != 9 then
return -1
return -1
endi
endi
print =============== drop database
print =============== drop database
...
...
tests/system-test/0-others/show.py
浏览文件 @
bad2bb52
...
@@ -128,7 +128,7 @@ class TDTestCase:
...
@@ -128,7 +128,7 @@ class TDTestCase:
continue
continue
else
:
else
:
tdLog
.
exit
(
f
"show create database check failed with
{
key
}
{
value
}
"
)
tdLog
.
exit
(
f
"show create database check failed with
{
key
}
{
value
}
"
)
tdSql
.
query
(
'show vnodes 1'
)
tdSql
.
query
(
'show vnodes
on dnode
1'
)
tdSql
.
checkRows
(
self
.
vgroups
)
tdSql
.
checkRows
(
self
.
vgroups
)
tdSql
.
execute
(
f
'use
{
self
.
dbname
}
'
)
tdSql
.
execute
(
f
'use
{
self
.
dbname
}
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录