提交 bad2bb52 编写于 作者: B Benguang Zhao

enh: update test cases for show vnodes

上级 80518cf8
...@@ -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) {
......
...@@ -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 $data10 != 1 then
return -1 return -1
endi endi
if $data(4)[2] != leader then if $data11 != 5 then
return -1 return -1
endi endi
if $data(4)[3] != d2 then if $data12 != d2 then
return -1 return -1
endi endi
if $data(4)[4] != 1 then if $data13 != 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
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册