提交 b4917449 编写于 作者: H Hui Li

[modify sim cases]

上级 cf2a9981
......@@ -324,18 +324,19 @@ cd ../../../debug; make
./test.sh -f unique/vnode/replica3_vgroup.sim
./test.sh -f unique/arbitrator/check_cluster_cfg_para.sim
./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim # TODO: check file number using sim ?
./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim
./test.sh -f unique/arbitrator/dn3_mn1_full_createTableFail.sim
./test.sh -f unique/arbitrator/dn3_mn1_full_dropDnodeFail.sim
./test.sh -f unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
./test.sh -f unique/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
#./test.sh -f unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim # fail
./test.sh -f unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
./test.sh -f unique/arbitrator/dn3_mn1_replica_change.sim
./test.sh -f unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
./test.sh -f unique/arbitrator/dn3_mn1_vnode_change.sim
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim # fail
./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
./test.sh -f unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_delDir.sim # unsupport
./test.sh -f unique/arbitrator/dn3_mn1_vnode_nomaster.sim
./test.sh -f unique/arbitrator/dn3_mn2_killDnode.sim
......@@ -350,7 +351,7 @@ cd ../../../debug; make
./test.sh -f unique/arbitrator/offline_replica3_createTable_online.sim
./test.sh -f unique/arbitrator/offline_replica3_dropDb_online.sim
./test.sh -f unique/arbitrator/offline_replica3_dropTable_online.sim
#./test.sh -f unique/arbitrator/replica_changeWithArbitrator.sim # fail
./test.sh -f unique/arbitrator/replica_changeWithArbitrator.sim
./test.sh -f unique/arbitrator/sync_replica2_alterTable_add.sim
./test.sh -f unique/arbitrator/sync_replica2_alterTable_drop.sim
./test.sh -f unique/arbitrator/sync_replica2_dropDb.sim
......
......@@ -158,11 +158,11 @@ if $data00 != $totalRows then
return -1
endi
system_content ls ../../../sim/dnode3/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l
print ---->dnode3 data files: $system_content , expect is 9
#if $system_content != @9@ then
# return -1
#endi
system_content ls ../../../sim/dnode3/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l | tr -d '\n'
print ---->dnode3 data files: $system_content expect: 9
if $system_content != 9 then
return -1
endi
print ============== step5: insert two data rows: now-16d, now+16d,
sql insert into $tb values ( now - 21d , -21 )
......@@ -175,11 +175,11 @@ if $data00 != $totalRows then
return -1
endi
system_content ls ../../../sim/dnode2/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l
print ---->dnode2 data files: $system_content , expect is 3
#if $system_content != @3@ then
# return -1
#endi
system_content ls ../../../sim/dnode2/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l | tr -d '\n'
print ---->dnode2 data files: $system_content expect: 3
if $system_content != 3 then
return -1
endi
print ============== step7: restart dnode3, waiting sync end
system sh/exec.sh -n dnode3 -s start
......@@ -215,13 +215,13 @@ if $data00 != $totalRows then
return -1
endi
system_content ls ../../../sim/dnode2/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l
print ---->dnode2 data files: $system_content , expect is 3
#if $system_content != @3@ then
# return -1
#endi
system_content ls ../../../sim/dnode3/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l
print ---->dnode3 data files: $system_content , expect is 3
#if $system_content != @3@ then
# return -1
#endi
\ No newline at end of file
system_content ls ../../../sim/dnode2/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l | tr -d '\n'
print ---->dnode2 data files: $system_content expect: 3
if $system_content != 3 then
return -1
endi
system_content ls ../../../sim/dnode3/data/vnode/vnode2/tsdb/data/ -l |grep "^-"|wc -l | tr -d '\n'
print ---->dnode3 data files: $system_content expect: 3
if $system_content != 3 then
return -1
endi
\ No newline at end of file
......@@ -346,10 +346,11 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
print ============== step7: restart dnode3, and run query
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep $sleepTimer
$loopCnt = 0
wait_dnode3_reready_2:
wait_dnode23_reready_2:
$loopCnt = $loopCnt + 1
if $loopCnt == 10 then
return -1
......@@ -357,7 +358,7 @@ endi
sql show dnodes
if $rows != 3 then
sleep 2000
goto wait_dnode3_reready_2
goto wait_dnode23_reready_2
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......@@ -366,13 +367,18 @@ $dnode1Status = $data4_1
$dnode2Status = $data4_2
$dnode3Status = $data4_3
if $dnode2Status != ready then
sleep 2000
goto wait_dnode23_reready_2
endi
if $dnode3Status != ready then
sleep 2000
goto wait_dnode3_reready_2
goto wait_dnode23_reready_2
endi
$loopCnt = 0
wait_dnode3_vgroup_master_2:
wait_dnode23_vgroup_ok:
$loopCnt = $loopCnt + 1
if $loopCnt == 10 then
return -1
......@@ -380,7 +386,7 @@ endi
sql show vgroups
if $rows != 1 then
sleep 2000
goto wait_dnode3_vgroup_master_2
goto wait_dnode23_vgroup_ok
endi
print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
......@@ -389,13 +395,13 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode2Vtatus = $data7_2
$dnode3Vtatus = $data4_2
if $dnode2Vtatus != offline then
if $dnode2Vtatus == offline then
sleep 2000
goto wait_dnode3_vgroup_master_2
goto wait_dnode23_vgroup_ok
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus == offline then
sleep 2000
goto wait_dnode3_vgroup_master_2
goto wait_dnode23_vgroup_ok
endi
sql select count(*) from $stb
......
......@@ -345,11 +345,12 @@ print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $dat
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
print ============== step7: restart dnode3, and run query
print ============== step7: restart dnode2/dnode3, and run query
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep $sleepTimer
$loopCnt = 0
wait_dnode3_reready_2:
wait_dnode23_reready_2:
$loopCnt = $loopCnt + 1
if $loopCnt == 10 then
return -1
......@@ -357,7 +358,7 @@ endi
sql show dnodes
if $rows != 3 then
sleep 2000
goto wait_dnode3_reready_2
goto wait_dnode23_reready_2
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......@@ -366,13 +367,17 @@ $dnode1Status = $data4_1
$dnode2Status = $data4_2
$dnode3Status = $data4_3
if $dnode2Status != ready then
sleep 2000
goto wait_dnode23_reready_2
endi
if $dnode3Status != ready then
sleep 2000
goto wait_dnode3_reready_2
goto wait_dnode23_reready_2
endi
$loopCnt = 0
wait_dnode3_vgroup_master_2:
wait_dnode23_vgroup_ok:
$loopCnt = $loopCnt + 1
if $loopCnt == 10 then
return -1
......@@ -380,7 +385,7 @@ endi
sql show vgroups
if $rows != 1 then
sleep 2000
goto wait_dnode3_vgroup_master_2
goto wait_dnode23_vgroup_ok
endi
print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
......@@ -389,13 +394,13 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $dat
$dnode2Vtatus = $data7_2
$dnode3Vtatus = $data4_2
if $dnode2Vtatus != offline then
if $dnode2Vtatus == offline then
sleep 2000
goto wait_dnode3_vgroup_master_2
goto wait_dnode23_vgroup_ok
endi
if $dnode3Vtatus != master then
if $dnode3Vtatus == offline then
sleep 2000
goto wait_dnode3_vgroup_master_2
goto wait_dnode23_vgroup_ok
endi
sql select count(*) from $stb
......
......@@ -11,7 +11,8 @@ run unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
run unique/arbitrator/dn3_mn1_vnode_change.sim
run unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
run unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
run unique/arbitrator/dn3_mn1_vnode_delDir.sim
run unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
####run unique/arbitrator/dn3_mn1_vnode_delDir.sim # unsupport
run unique/arbitrator/dn3_mn1_vnode_nomaster.sim
run unique/arbitrator/dn3_mn2_killDnode.sim
run unique/arbitrator/insert_duplicationTs.sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册