diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 3f8e387bbc2fe0896fca9f77f14f6eb3db4a8c4a..e90f22b6552b3454ab48c2012a475eca2eddff24 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -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 diff --git a/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim b/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim index ae73fc9423382728374e84cd56a4daa34c5fb968..193a54ac6ab46f4c0da52f1b521fb0b12f77f0d0 100644 --- a/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.sim +++ b/tests/script/unique/arbitrator/dn2_mn1_cache_file_sync.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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim index a0d8acb272254db1f724f4eeff3e25a4237ae741..50d9bbbecbb7229773d40fc25f12c8bedb283127 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim @@ -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 diff --git a/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim b/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim index 96def07f4a3f6342e9861cce1f3faaeac0aeffb0..ce05b0b5ff7eff84e90a753cedb7bf08c04c83c7 100644 --- a/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim +++ b/tests/script/unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim @@ -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 diff --git a/tests/script/unique/arbitrator/testSuite.sim b/tests/script/unique/arbitrator/testSuite.sim index 9593137bdddd9504e9d859275081bc42e6984131..53160812b0ed1f2b863ee66e8ad8b03e2e80e0c7 100644 --- a/tests/script/unique/arbitrator/testSuite.sim +++ b/tests/script/unique/arbitrator/testSuite.sim @@ -9,9 +9,10 @@ run unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim run unique/arbitrator/dn3_mn1_replica_change.sim 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_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