Skip to content

Commit

Permalink
enh: update test cases for show vnodes
Browse files Browse the repository at this point in the history
  • Loading branch information
bgzhao66 committed Aug 16, 2023
1 parent b0d6d08 commit 07a76c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
32 changes: 18 additions & 14 deletions tests/script/tsim/db/basic1.sim
Original file line number Diff line number Diff line change
Expand Up @@ -107,35 +107,39 @@ if $data30 != 12 then
return -1
endi

print =============== show vnodes
sql show vnodes 1
print =============== show vnodes on dnode 1
sql show vnodes on dnode 1
if $rows != 9 then
return -1
endi

if $data(4)[1] != 1 then
return -1
if $data10 != 1 then
return -1
endi

if $data(4)[2] != leader then
return -1
if $data11 != 5 then
return -1
endi

if $data(4)[3] != d2 then
return -1
if $data12 != d2 then
return -1
endi

if $data(4)[4] != 1 then
return -1
if $data13 != leader then
return -1
endi

if $data(4)[5] != localhost:7100 then
return -1
print $data14
print $data15

if $data16 != 1 then
return -1
endi

sql show vnodes 'localhost:7100'
print ================ show vnodes
sql show vnodes
if $rows != 9 then
return -1
return -1
endi

print =============== drop database
Expand Down
2 changes: 1 addition & 1 deletion tests/system-test/0-others/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def show_create_sql(self):
continue
else:
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.execute(f'use {self.dbname}')

Expand Down

0 comments on commit 07a76c0

Please sign in to comment.