diff --git a/src/mnode/src/mgmtShell.c b/src/mnode/src/mgmtShell.c index 193521b0260c42213f3d07578fa129a33c206f65..08ea74c9f6bf9774649837e72051b77037e35b38 100644 --- a/src/mnode/src/mgmtShell.c +++ b/src/mnode/src/mgmtShell.c @@ -375,7 +375,7 @@ static int mgmtShellRetriveAuth(char *user, char *spi, char *encrypt, char *secr if (!sdbIsMaster()) { *secret = 0; - return TSDB_CODE_SUCCESS; + return TSDB_CODE_NOT_READY; } SUserObj *pUser = mgmtGetUser(user); @@ -594,4 +594,4 @@ void* mgmtCloneQueuedMsg(SQueuedMsg *pSrcMsg) { pSrcMsg->pUser = NULL; return pDestMsg; -} \ No newline at end of file +} diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index ee7de1977060ac270e459d4ebc24cb4f61febf12..1f87b9fd5306bcccd7b28fb63c874956defa34dc 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -621,11 +621,13 @@ static SRpcConn *rpcAllocateServerConn(SRpcInfo *pRpc, SRecvInfo *pRecv) { pConn->tranId = (uint16_t)(rand() & 0xFFFF); pConn->ownId = htonl(pConn->sid); pConn->linkUid = pHead->linkUid; - if (pRpc->afp && (*pRpc->afp)(pConn->user, &pConn->spi, &pConn->encrypt, pConn->secret, pConn->ckey) < 0) { - tWarn("%s %p, user not there", pRpc->label, pConn); - taosFreeId(pRpc->idPool, sid); // sid shall be released - terrno = TSDB_CODE_INVALID_USER; - pConn = NULL; + if (pRpc->afp) { + terrno = (*pRpc->afp)(pConn->user, &pConn->spi, &pConn->encrypt, pConn->secret, pConn->ckey); + if (terrno != 0) { + tWarn("%s %p, user not there or server not ready", pRpc->label, pConn); + taosFreeId(pRpc->idPool, sid); // sid shall be released + pConn = NULL; + } } } @@ -1344,7 +1346,8 @@ static int rpcCheckAuthentication(SRpcConn *pConn, char *msg, int msgLen) { if ( !rpcIsReq(pHead->msgType) ) { // for response, if code is auth failure, it shall bypass the auth process code = htonl(pHead->code); - if (code==TSDB_CODE_INVALID_TIME_STAMP || code==TSDB_CODE_AUTH_FAILURE || code==TSDB_CODE_INVALID_USER) { + if (code==TSDB_CODE_INVALID_TIME_STAMP || code==TSDB_CODE_AUTH_FAILURE || + code==TSDB_CODE_INVALID_USER || code == TSDB_CODE_NOT_READY) { pHead->msgLen = (int32_t)htonl((uint32_t)pHead->msgLen); return 0; } diff --git a/src/tsdb/src/tsdbRWHelper.c b/src/tsdb/src/tsdbRWHelper.c index ee2f29ea5558b754147ffc9c0760e8213c854d55..170decc13ed5057aac05382fd7c0299f01191b7c 100644 --- a/src/tsdb/src/tsdbRWHelper.c +++ b/src/tsdb/src/tsdbRWHelper.c @@ -570,24 +570,14 @@ static int tsdbCheckAndDecodeColumnData(SDataCol *pDataCol, char *content, int32 pDataCol->len = (*(tDataTypeDesc[pDataCol->type].decompFunc))( content, len - sizeof(TSCKSUM), numOfPoints, pDataCol->pData, pDataCol->spaceSize, comp, buffer, bufferSize); if (pDataCol->type == TSDB_DATA_TYPE_BINARY || pDataCol->type == TSDB_DATA_TYPE_NCHAR) { - pDataCol->len += (sizeof(int32_t) * maxPoints); dataColSetOffset(pDataCol, numOfPoints); } } else { // No need to decompress, just memcpy it - switch (pDataCol->type) { - case TSDB_DATA_TYPE_BINARY: - case TSDB_DATA_TYPE_NCHAR: - pDataCol->len = sizeof(int32_t) * maxPoints; - memcpy((char *)pDataCol->pData + pDataCol->len, content, len - sizeof(TSCKSUM)); - pDataCol->len += (len - sizeof(TSCKSUM)); - dataColSetOffset(pDataCol, numOfPoints); - break; - - default: - pDataCol->len = len - sizeof(TSCKSUM); - memcpy(pDataCol->pData, content, pDataCol->len); - break; + pDataCol->len = len - sizeof(TSCKSUM); + memcpy(pDataCol->pData, content, pDataCol->len); + if (pDataCol->type == TSDB_DATA_TYPE_BINARY || pDataCol->type == TSDB_DATA_TYPE_NCHAR) { + dataColSetOffset(pDataCol, numOfPoints); } } return 0; diff --git a/tests/script/general/cache/cache_balance.sim b/tests/script/general/cache/cache_balance.sim index b71e81023415081d4b4753e5db82a6e016e11370..27d048652cba8bbcd355cd3df099e42b4e5c2cc5 100644 --- a/tests/script/general/cache/cache_balance.sim +++ b/tests/script/general/cache/cache_balance.sim @@ -43,7 +43,7 @@ endw sleep 3000 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 20000 sql select * from log.dn_192_168_0_1 diff --git a/tests/script/general/db/backup/keep.sim b/tests/script/general/db/backup/keep.sim index 671d77de8c99c19929f4135b1320746af9b67265..fed45ead929c8c0185e12102ae2255902a8c497f 100644 --- a/tests/script/general/db/backup/keep.sim +++ b/tests/script/general/db/backup/keep.sim @@ -21,7 +21,7 @@ system sh/exec.sh -n dnode1 -s start sql connect print ========= start other dnodes -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/general/show/dnodes.sim b/tests/script/general/show/dnodes.sim index 0951c1a6c90b4d1e6379acb9d59b78a20dfd5fae..46091383259fc3b2040732e63fa1672596122fab 100644 --- a/tests/script/general/show/dnodes.sim +++ b/tests/script/general/show/dnodes.sim @@ -4,8 +4,8 @@ system sh/exec.sh -n dnode1 -s start sql connect print =============== unsupport -sql_error create dnode 192.168.0.2 -sql_error drop dnode 192.168.0.2 +sql_error create dnode $hostname2 +sql_error drop dnode $hostname2 print =============== show dnodes sql show dnodes; diff --git a/tests/script/unique/account/authority.sim b/tests/script/unique/account/authority.sim index e1966e378c6273768c16360afdd0deff5fe754e6..e6532458f0a83580ada801daed0829b8eaf398b0 100644 --- a/tests/script/unique/account/authority.sim +++ b/tests/script/unique/account/authority.sim @@ -84,11 +84,11 @@ sql alter user read pass 'taosdata' -x step23 return -1 step23: -sql create dnode 192.168.0.2 -x step24 +sql create dnode $hostname2 -x step24 return -1 step24: -sql drop dnode 192.168.0.2 -x step25 +sql drop dnode $hostname2 -x step25 return -1 step25: diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index 32a1396f90b9b2e822f78d9f305afadba624479f..3ae30f283d6a21ee16e8b9b9779df528deb352df 100644 --- a/tests/script/unique/big/balance.sim +++ b/tests/script/unique/big/balance.sim @@ -92,7 +92,7 @@ if $data00 != $totalNum then endi print ========== step1 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 @@ -144,12 +144,12 @@ if $data00 != $totalNum then endi print ========== step2 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 10000 print ========== step3 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show3: @@ -206,7 +206,7 @@ if $data00 != $totalNum then endi print ========== step4 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 $x = 0 show4: @@ -260,7 +260,7 @@ endi print ========== step5 sql alter database db replica 2 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start $x = 0 diff --git a/tests/script/unique/big/maxvnodes.sim b/tests/script/unique/big/maxvnodes.sim index 7d87dc47449b763d58a304f6640592ff74b68eb0..12affc72c5af637e8510bd49618828ea119c121a 100644 --- a/tests/script/unique/big/maxvnodes.sim +++ b/tests/script/unique/big/maxvnodes.sim @@ -48,7 +48,7 @@ system sh/cfg.sh -n dnode2 -c maxShellConns -v 100000 system sh/cfg.sh -n dnode2 -c maxMgmtConnections -v 100000 print ========== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 diff --git a/tests/script/unique/cluster/backup/balance4.sim b/tests/script/unique/cluster/backup/balance4.sim index a1fe5713f37ee93efe1586c9a8714a63ba72e546..8e192ae07668f891fac31d718c3b46e8a9659340 100644 --- a/tests/script/unique/cluster/backup/balance4.sim +++ b/tests/script/unique/cluster/backup/balance4.sim @@ -87,9 +87,9 @@ connectTbase: endi sql connect -x connectTbase -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start @@ -189,7 +189,7 @@ endi print ============================== step2 print ========= start dnode5 -sql create dnode 192.168.0.5 +sql create dnode $hostname5 system sh/exec.sh -n dnode5 -s start sleep 9000 @@ -219,7 +219,7 @@ endi print ============================== step3 print ========= drop dnode2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -261,7 +261,7 @@ system sh/exec.sh -n dnode2 -s stop print ============================== step4 print ========= start dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 10000 @@ -290,7 +290,7 @@ endi print ============================== step5 print ========= drop dnode3 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 sleep 9000 $x = 0 @@ -332,7 +332,7 @@ system sh/exec.sh -n dnode3 -s stop print ============================== step6 print ========= start dnode3 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 9000 @@ -361,7 +361,7 @@ endi print ============================== step7 print ========= drop dnode4 -sql drop dnode 192.168.0.4 +sql drop dnode $hostname4 sleep 9000 $x = 0 @@ -403,7 +403,7 @@ system sh/exec.sh -n dnode4 -s stop print ============================== step8 print ========= start dnode4 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start sleep 9000 @@ -432,7 +432,7 @@ endi print ============================== step9 print ========= drop dnode5 -sql drop dnode 192.168.0.5 +sql drop dnode $hostname5 sleep 9000 $x = 0 @@ -474,7 +474,7 @@ system sh/exec.sh -n dnode5 -s stop print ============================== step10 print ========= start dnode5 -sql create dnode 192.168.0.5 +sql create dnode $hostname5 system sh/exec.sh -n dnode5 -s start sleep 9000 @@ -507,7 +507,7 @@ system sh/exec.sh -n dnode1 -s stop print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 @@ -548,7 +548,7 @@ endi print ============================== step12 print ========= start dnode1 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 system sh/exec.sh -n dnode1 -s start sleep 12000 diff --git a/tests/script/unique/cluster/backup/balance5.sim b/tests/script/unique/cluster/backup/balance5.sim index 83486bb813b2b2a3552f2012e549450eb1bd4e1c..4eb729f8f40d1aeb7104bb2527c4b5849c8a8f73 100644 --- a/tests/script/unique/cluster/backup/balance5.sim +++ b/tests/script/unique/cluster/backup/balance5.sim @@ -87,10 +87,10 @@ connectTbase: endi sql connect -x connectTbase -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 -sql create dnode 192.168.0.5 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 +sql create dnode $hostname5 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start @@ -173,7 +173,7 @@ endi print ============================== step2 print ========= start dnode6 -sql create dnode 192.168.0.6 +sql create dnode $hostname6 system sh/exec.sh -n dnode6 -s start sql create database c_b5_d3 replica 5 @@ -239,7 +239,7 @@ system sh/exec.sh -n dnode1 -s stop print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 @@ -309,13 +309,13 @@ sql insert into c_b5_t4 values(now+3s, 43) sql insert into c_b5_t4 values(now+4s, 42) sql insert into c_b5_t4 values(now+5s, 41) -sql create dnode 192.168.0.1 +sql create dnode $hostname1 system sh/exec.sh -n dnode1 -s start sleep 2000 -sql create dnode 192.168.0.7 +sql create dnode $hostname7 system sh/exec.sh -n dnode7 -s start -sql create dnode 192.168.0.8 +sql create dnode $hostname8 system sh/exec.sh -n dnode8 -s start sleep 9000 diff --git a/tests/script/unique/cluster/backup/balancex.sim b/tests/script/unique/cluster/backup/balancex.sim index 7d4f5f7660763d85075601a495beae0dbcaf19a9..b88ea249f3acd685b6bb98bd6c25f0170839c892 100644 --- a/tests/script/unique/cluster/backup/balancex.sim +++ b/tests/script/unique/cluster/backup/balancex.sim @@ -85,9 +85,9 @@ connectTbase: endi sql connect -x connectTbase -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start @@ -184,7 +184,7 @@ sql insert into c_bx_t3 values(now+3s, 33) sql insert into c_bx_t3 values(now+4s, 32) sql insert into c_bx_t3 values(now+5s, 31) -sql create dnode 192.168.0.5 +sql create dnode $hostname5 system sh/exec.sh -n dnode5 -s start sleep 9000 @@ -218,7 +218,7 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index 6d4e67de0e133a58a6025d09e6898a9923d94bcf..fe090ff3cad892e5c627289923848557c0052cd4 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -64,7 +64,7 @@ endi print ============================== step2 print ========= start dnode2 sleep 2000 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 5000 @@ -111,7 +111,7 @@ sql insert into c_b1_t3 values(1520000024031, 31) print ============================== step4 print ========= drop dnode2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -155,7 +155,7 @@ system sh/cfg.sh -n dnode2 -c clog -v 1 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 sleep 3000 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 9000 $x = 0 @@ -194,7 +194,7 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 @@ -230,7 +230,7 @@ print dnode4 ==> $dnode4Role print ============================== step7 print ========= add dnode1 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 sleep 3000 system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 @@ -276,7 +276,7 @@ print ========= drop dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT print stop dnode2 and sleep 10000 sleep 20000 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 print drop dnode2 and sleep 9000 sleep 19000 @@ -316,7 +316,7 @@ endi print ============================== step9 print ========= add dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 @@ -406,7 +406,7 @@ endi print ============================== step11 print ========= drop dnode2 sleep 2000 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -452,7 +452,7 @@ error3: print ============================== step13 print ========= add dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 @@ -516,7 +516,7 @@ print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role sleep 2000 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 15000 @@ -586,8 +586,8 @@ print dnode4 ==> $dnode4Role print ========== add dnode4 sleep 2000 -sql create dnode 192.168.0.4 -print sql create dnode 192.168.0.4 over +sql create dnode $hostname4 +print sql create dnode $hostname4 over system sh/exec.sh -n dnode4 -s start print sleep 12000 sleep 12000 @@ -626,7 +626,7 @@ endi print ============================== step16 print ========= drop dnode4, create db9 -sql drop dnode 192.168.0.4 +sql drop dnode $hostname4 sleep 10000 sql create database c_b1_d9 tables 4 sql use c_b1_d9 diff --git a/tests/script/unique/cluster/balance1_bug.sim b/tests/script/unique/cluster/balance1_bug.sim index 1796d8d2f2454518259a889fbfdbb1b8965512c5..b1247f5ea7fcdba1ea05b058bc6299f7122980dc 100644 --- a/tests/script/unique/cluster/balance1_bug.sim +++ b/tests/script/unique/cluster/balance1_bug.sim @@ -64,7 +64,7 @@ endi print ============================== step2 print ========= start dnode2 sleep 2000 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 5000 @@ -111,7 +111,7 @@ sql insert into c_b1_t3 values(now+5s, 31) print ============================== step4 print ========= drop dnode2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -149,7 +149,7 @@ print ========= add dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT sleep 5000 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 9000 $x = 0 @@ -188,7 +188,7 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 @@ -224,7 +224,7 @@ print dnode4 ==> $dnode4Role print ============================== step7 print ========= add dnode1 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 sleep 23000 system sh/exec.sh -n dnode1 -s start sleep 14000 @@ -264,7 +264,7 @@ print ========= drop dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT print stop dnode2 and sleep 10000 sleep 20000 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 print drop dnode2 and sleep 9000 sleep 19000 @@ -304,7 +304,7 @@ endi print ============================== step9 print ========= add dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 9000 @@ -388,7 +388,7 @@ endi print ============================== step11 print ========= drop dnode2 sleep 2000 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -434,7 +434,7 @@ error3: print ============================== step13 print ========= add dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 9000 @@ -506,7 +506,7 @@ print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role sleep 2000 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 15000 @@ -576,8 +576,8 @@ print dnode4 ==> $dnode4Role print ========== add dnode4 sleep 2000 -sql create dnode 192.168.0.4 -print sql create dnode 192.168.0.4 over +sql create dnode $hostname4 +print sql create dnode $hostname4 over system sh/exec.sh -n dnode4 -s start print sleep 12000 sleep 12000 @@ -616,7 +616,7 @@ endi print ============================== step16 print ========= drop dnode4, create db9 -sql drop dnode 192.168.0.4 +sql drop dnode $hostname4 sleep 10000 sql create database c_b1_d9 tables 4 sql use c_b1_d9 diff --git a/tests/script/unique/cluster/balance1_single.sim b/tests/script/unique/cluster/balance1_single.sim index 030d6551e091c309c7a97cd658195f2d431b801c..f4a400318b4cd322d8e799460283c2a9f5140f6f 100644 --- a/tests/script/unique/cluster/balance1_single.sim +++ b/tests/script/unique/cluster/balance1_single.sim @@ -34,7 +34,7 @@ print ========= start dnode1 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 @@ -93,7 +93,7 @@ endi print ============================== step2 print ========= start dnode3 sleep 3000 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 8000 @@ -141,7 +141,7 @@ sql insert into c_b1_t3 values(now+5s, 31) print ============================== step4 print ========= drop dnode3 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 sleep 9000 $x = 0 @@ -179,7 +179,7 @@ print ========= add dnode3 system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep 5000 system sh/exec.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 9000 $x = 0 @@ -208,7 +208,7 @@ system sh/exec.sh -n dnode2 -s stop -x SIGINT print stop dnode2 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 print drop dnode2 and sleep 9000 sleep 9000 @@ -236,7 +236,7 @@ endi print ============================== step7 print ========= add dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 9000 @@ -265,7 +265,7 @@ print ========= drop dnode3 system sh/exec.sh -n dnode3 -s stop -x SIGINT print stop dnode3 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 print drop dnode3 and sleep 9000 sleep 9000 @@ -291,7 +291,7 @@ endi print ============================== step9 print ========= add dnode3 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 9000 @@ -354,7 +354,7 @@ sql insert into c_b1_t2 values(now+1s, 25) print ============================== step11 print ========= drop dnode3 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 sleep 9000 $x = 0 @@ -386,7 +386,7 @@ sql use c_b1_d5 print ============================== step13 print ========= add dnode3 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 9000 @@ -436,7 +436,7 @@ print dnode3 $dnode3Vnodes print ============================== step14 print ========= add dnode4 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start sleep 10000 @@ -488,8 +488,8 @@ sql insert into c_b1_t8 values(now+5s, 81) print ========== add dnode5 -sql create dnode 192.168.0.5 -print sql create dnode 192.168.0.5 over +sql create dnode $hostname5 +print sql create dnode $hostname5 over system sh/exec.sh -n dnode5 -s start print sleep 12000 sleep 12000 @@ -528,7 +528,7 @@ endi print ============================== step16 print ========= drop dnode5, create db9 -sql drop dnode 192.168.0.5 +sql drop dnode $hostname5 sleep 10000 sql create database c_b1_d9 tables 4 sql use c_b1_d9 diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index 9a0a88b609aa6925bc61cd92512e78654e853e42..98ee9628391d8f71d2d2dbba48b7f81af71859dc 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -50,8 +50,8 @@ system sh/exec.sh -n dnode1 -s start sql connect sleep 4001 -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sleep 4001 @@ -110,7 +110,7 @@ endi print ============================== step2 print ========= drop dnode2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -152,7 +152,7 @@ system sh/exec.sh -n dnode2 -s stop -x SIGINT print ============================== step3 print ========= start dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 3000 system sh/deploy.sh -n dnode2 -i 2 @@ -202,7 +202,7 @@ print dnode4 ==> $dnode4Role print ============================== step4 print ========= drop dnode3 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 sleep 9000 $x = 0 @@ -244,7 +244,7 @@ system sh/exec.sh -n dnode3 -s stop -x SIGINT print ============================== step5 print ========= start dnode3 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 3000 system sh/deploy.sh -n dnode3 -i 3 @@ -298,7 +298,7 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 @@ -339,7 +339,7 @@ print dnode4 ==> $dnode4Role print ============================== step7 print ========= start dnode1 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 sql show mnodes $dnode1Role = $data3_192.168.0.1 @@ -410,7 +410,7 @@ sql insert into c_b2_t4 values(1520000022043, 43) sql insert into c_b2_t4 values(1520000023042, 42) sql insert into c_b2_t4 values(1520000024041, 41) -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start sleep 9000 @@ -456,8 +456,8 @@ endi print ============================== step9 print ========= drop dnode1.4 -sql drop dnode 192.168.0.1 -sql drop dnode 192.168.0.4 +sql drop dnode $hostname1 +sql drop dnode $hostname4 sleep 10000 sql show mnodes @@ -505,8 +505,8 @@ system sh/exec.sh -n dnode4 -s stop -x SIGINT print ============================== step10 print ========= start dnode1.4 -sql create dnode 192.168.0.1 -sql create dnode 192.168.0.4 +sql create dnode $hostname1 +sql create dnode $hostname4 sleep 3000 system sh/deploy.sh -n dnode1 -i 1 diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index 6e5d910a117970ab77eedc2d236bd5f085251cc7..ad9631a88f213396bec562e0616fefeba3bccd43 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -60,8 +60,8 @@ system sh/exec.sh -n dnode1 -s start sql connect sleep 2001 -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sleep 3001 @@ -125,7 +125,7 @@ endi print ============================== step2 print ========= start dnode4 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start sleep 9000 @@ -152,7 +152,7 @@ endi print ============================== step3 print ========= drop dnode2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 9000 $x = 0 @@ -196,7 +196,7 @@ system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c clog -v 1 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 sleep 3000 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 10000 @@ -223,7 +223,7 @@ endi print ============================== step5 print ========= drop dnode3 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 sleep 9000 $x = 0 @@ -268,7 +268,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode3 -c clog -v 1 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0 sleep 3000 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 9000 @@ -295,7 +295,7 @@ endi print ============================== step7 print ========= drop dnode4 -sql drop dnode 192.168.0.4 +sql drop dnode $hostname4 sleep 9000 $x = 0 @@ -339,7 +339,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode4 -c clog -v 1 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0 sleep 3000 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start sleep 9000 @@ -370,7 +370,7 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 @@ -413,7 +413,7 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c clog -v 1 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 sleep 3000 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 system sh/exec.sh -n dnode1 -s start sleep 9000 @@ -490,7 +490,7 @@ endi print ============================== step12 print ========= drop dnode1 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 sleep 10000 $x = 0 diff --git a/tests/script/unique/column/replica3.sim b/tests/script/unique/column/replica3.sim index 97c89f89f36bf752120349e817d6f487e34744b8..db7383f74885f59c7a94d6f97f2b2e0a76af23b1 100644 --- a/tests/script/unique/column/replica3.sim +++ b/tests/script/unique/column/replica3.sim @@ -14,8 +14,8 @@ system sh/cfg.sh -n dnode3 -c numofMpeers -v 3 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start diff --git a/tests/script/unique/db/commit.sim b/tests/script/unique/db/commit.sim index ec84122b47f085caf9786250a4fc36f0b3f6abd6..d9c507f5fb9b25d2d39f7d88de308bd41a4f63d1 100644 --- a/tests/script/unique/db/commit.sim +++ b/tests/script/unique/db/commit.sim @@ -22,7 +22,7 @@ sql connect sleep 3000 print ========= start other dnodes -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/db/delete.sim b/tests/script/unique/db/delete.sim index d22ca2623de9a654913a95eda9611eb63d4a0fda..ed41f1bb90c48da0ce07cb26f83c75dbf90a16d0 100644 --- a/tests/script/unique/db/delete.sim +++ b/tests/script/unique/db/delete.sim @@ -22,9 +22,9 @@ system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/db/delete_part.sim b/tests/script/unique/db/delete_part.sim index e599cc6c4afd342b80b854c7e82949f1becdaa63..7e4e1b0b965cc7913ca6c53a7a45766c2cb1fc14 100644 --- a/tests/script/unique/db/delete_part.sim +++ b/tests/script/unique/db/delete_part.sim @@ -37,7 +37,7 @@ system sh/cfg.sh -n dnode4 -c tables -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/db/replica_add12.sim b/tests/script/unique/db/replica_add12.sim index b9ce0595c78f54d664db1bd950a66105414d49cb..6217a965c0568b5edc54850f7e02927b73f001b3 100644 --- a/tests/script/unique/db/replica_add12.sim +++ b/tests/script/unique/db/replica_add12.sim @@ -1,9 +1,5 @@ system sh/stop_dnodes.sh - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -32,9 +28,9 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start sleep 3000 @@ -77,19 +73,19 @@ endi sleep 2000 sql show dnodes -print dnode192.168.0.1 ==> openVnodes: $data3_1 -print dnode192.168.0.2 ==> openVnodes: $data3_2 -print dnode192.168.0.3 ==> openVnodes: $data3_3 +print dnode1 ==> openVnodes: $data3_1 +print dnode2 ==> openVnodes: $data3_2 +print dnode3 ==> openVnodes: $data3_3 -if $data3_1 != 0 then +if $data2_1 != 0 then return -1 endi -if $data3_2 != 2 then +if $data2_2 != 2 then return -1 endi -if $data3_3 != 2 then +if $data2_3 != 2 then return -1 endi @@ -103,19 +99,19 @@ sleep 10000 print ======== step3 sql show dnodes -print dnode192.168.0.1 ==> openVnodes: $data3_1 -print dnode192.168.0.2 ==> openVnodes: $data3_2 -print dnode192.168.0.3 ==> openVnodes: $data3_3 +print dnode1 ==> openVnodes: $data3_1 +print dnode2 ==> openVnodes: $data3_2 +print dnode3 ==> openVnodes: $data3_3 -if $data3_1 != 0 then +if $data2_1 != 0 then return -1 endi -if $data3_2 != 4 then +if $data2_2 != 4 then return -1 endi -if $data3_3 != 4 then +if $data2_3 != 4 then return -1 endi @@ -174,15 +170,13 @@ endi print ===== insert data -sql insert into d1.t1 values(now, 3) -# no master +sql_error insert into d1.t1 values(now, 3) sql_error insert into d2.t2 values(now, 3) -sql insert into d3.t3 values(now, 3) -# no master +sql_error insert into d3.t3 values(now, 3) sql_error insert into d4.t4 values(now, 3) sql select * from d1.t1 -if $rows != 3 then +if $rows != 2 then return -1 endi @@ -192,7 +186,7 @@ if $rows != 2 then endi sql select * from d3.t3 -if $rows != 3 then +if $rows != 2 then return -1 endi @@ -205,8 +199,11 @@ print ========= step6 system sh/exec_up.sh -n dnode2 -s start sleep 5000 +sql insert into d1.t1 values(now, 3) sql insert into d2.t2 values(now, 3) +sql insert into d3.t3 values(now, 3) sql insert into d4.t4 values(now, 3) + sql select * from d1.t1 if $rows != 3 then return -1 @@ -232,20 +229,28 @@ print ========= step61 system sh/exec_up.sh -n dnode3 -s stop -x SIGINT sleep 5000 -# no master -sql_error insert into d1.t1 values(now, 4) -sql insert into d2.t2 values(now, 4) -# no master -sql_error insert into d3.t3 values(now, 4) -sql insert into d4.t4 values(now, 4) +sql_error insert into d1.t1 values(now, 3) +sql_error insert into d2.t2 values(now, 3) +sql_error insert into d3.t3 values(now, 3) +sql_error insert into d4.t4 values(now, 3) + +sql select * from d1.t1 +if $rows != 3 then + return -1 +endi sql select * from d2.t2 -if $rows != 4 then +if $rows != 3 then + return -1 +endi + +sql select * from d3.t3 +if $rows != 3 then return -1 endi sql select * from d4.t4 -if $rows != 4 then +if $rows != 3 then return -1 endi @@ -264,7 +269,7 @@ if $rows != 4 then endi sql select * from d2.t2 -if $rows != 5 then +if $rows != 4 then return -1 endi @@ -274,6 +279,6 @@ if $rows != 4 then endi sql select * from d4.t4 -if $rows != 5 then +if $rows != 4 then return -1 endi \ No newline at end of file diff --git a/tests/script/unique/db/replica_add13.sim b/tests/script/unique/db/replica_add13.sim index 0c44d9d8392e7e752345ffd8f45b10f728eb7a74..bb2b4ba1fd6c46707e7939ae8e576703b7a8078d 100644 --- a/tests/script/unique/db/replica_add13.sim +++ b/tests/script/unique/db/replica_add13.sim @@ -32,11 +32,11 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec_up.sh -n dnode4 -s start sleep 3000 @@ -93,10 +93,10 @@ show3: endi sql show dnodes -print dnode192.168.0.1 ==> openVnodes: $data3_1 -print dnode192.168.0.2 ==> openVnodes: $data3_2 -print dnode192.168.0.3 ==> openVnodes: $data3_3 -print dnode192.168.0.4 ==> openVnodes: $data3_4 +print dnode1 ==> openVnodes: $data3_1 +print dnode2 ==> openVnodes: $data3_2 +print dnode3 ==> openVnodes: $data3_3 +print dnode4 ==> openVnodes: $data3_4 if $data3_1 != 0 then return -1 diff --git a/tests/script/unique/db/replica_add23.sim b/tests/script/unique/db/replica_add23.sim index e1cc5767c5195cc9991409644176e983c23d01d1..df72d755aeec380f5bcf1c965f048bcad7e5d3a4 100644 --- a/tests/script/unique/db/replica_add23.sim +++ b/tests/script/unique/db/replica_add23.sim @@ -32,11 +32,11 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec_up.sh -n dnode4 -s start sleep 3000 @@ -93,10 +93,10 @@ show3: endi sql show dnodes -print dnode192.168.0.1 ==> openVnodes: $data3_1 -print dnode192.168.0.2 ==> openVnodes: $data3_2 -print dnode192.168.0.3 ==> openVnodes: $data3_3 -print dnode192.168.0.4 ==> openVnodes: $data3_4 +print dnode1 ==> openVnodes: $data3_1 +print dnode2 ==> openVnodes: $data3_2 +print dnode3 ==> openVnodes: $data3_3 +print dnode4 ==> openVnodes: $data3_4 if $data3_1 != 0 then return -1 diff --git a/tests/script/unique/db/replica_part.sim b/tests/script/unique/db/replica_part.sim index d8075434dc2227fdc95108d25797cff848a4ba86..6b42a7e05cead0772309442e66f99e762ff68657 100644 --- a/tests/script/unique/db/replica_part.sim +++ b/tests/script/unique/db/replica_part.sim @@ -22,9 +22,9 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/db/replica_reduce21.sim b/tests/script/unique/db/replica_reduce21.sim index 09d295125a21397f6543cdeb677e0699e439f3c4..88351871bc69f2834c483f26c1b5ef4cc34c08f0 100644 --- a/tests/script/unique/db/replica_reduce21.sim +++ b/tests/script/unique/db/replica_reduce21.sim @@ -22,7 +22,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/db/replica_reduce31.sim b/tests/script/unique/db/replica_reduce31.sim index 214b064afb05147f6d561e7f052257bcc5ee7c0a..8c9ad4f925349ed30f99324a668785081ffa087f 100644 --- a/tests/script/unique/db/replica_reduce31.sim +++ b/tests/script/unique/db/replica_reduce31.sim @@ -22,9 +22,9 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/db/replica_reduce32.sim b/tests/script/unique/db/replica_reduce32.sim index c1d4893a3eda831c632e0f5416ea0b8ac55bde40..9bf5f6abac400d6777be7b7c3acb0ee17a3da07c 100644 --- a/tests/script/unique/db/replica_reduce32.sim +++ b/tests/script/unique/db/replica_reduce32.sim @@ -22,9 +22,9 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/dnode/balance1.sim b/tests/script/unique/dnode/balance1.sim index eff6b1e51d8c0e4ba14d2619390cb77fc074a6ee..ea51b057787e2cf579410e97a4736736c44283c9 100644 --- a/tests/script/unique/dnode/balance1.sim +++ b/tests/script/unique/dnode/balance1.sim @@ -56,7 +56,7 @@ endi print ========== step2 sleep 2000 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start $x = 0 @@ -97,7 +97,7 @@ if $data3_2 != 2 then endi print ========== step4 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show4: @@ -123,7 +123,7 @@ endi system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step5 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start $x = 0 @@ -173,7 +173,7 @@ if $data3_3 != 3 then endi print ========== step7 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec_up.sh -n dnode4 -s start $x = 0 @@ -231,7 +231,7 @@ if $data3_4 != 2 then endi print ========== step9 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 $x = 0 show9: diff --git a/tests/script/unique/dnode/balance2.sim b/tests/script/unique/dnode/balance2.sim index d38952ea4f730aa86a45362549f7ad3cb4794be9..047d40cf9abd15bd8e22af266955d45a1be125ed 100644 --- a/tests/script/unique/dnode/balance2.sim +++ b/tests/script/unique/dnode/balance2.sim @@ -40,8 +40,8 @@ print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode2 -s start system sh/exec_up.sh -n dnode3 -s start sleep 3000 @@ -77,7 +77,7 @@ if $data3_3 != 2 then endi print ========== step2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show2: @@ -104,7 +104,7 @@ endi system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step3 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec_up.sh -n dnode4 -s start $x = 0 @@ -161,7 +161,7 @@ if $data3_4 != 1 then endi print ========== step5 -sql create dnode 192.168.0.5 +sql create dnode $hostname5 system sh/exec_up.sh -n dnode5 -s start $x = 0 @@ -195,7 +195,7 @@ if $data3_5 != 2 then endi print ========== step6 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 $x = 0 show6: diff --git a/tests/script/unique/dnode/balance3.sim b/tests/script/unique/dnode/balance3.sim index b379b50119b2a05f6556113f7f3721b39f53155c..70d3f98a726474a53f29c760e2d525dca785b188 100644 --- a/tests/script/unique/dnode/balance3.sim +++ b/tests/script/unique/dnode/balance3.sim @@ -46,9 +46,9 @@ print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec_up.sh -n dnode2 -s start system sh/exec_up.sh -n dnode3 -s start system sh/exec_up.sh -n dnode4 -s start @@ -90,7 +90,7 @@ if $data3_4 != 2 then endi print ========== step2 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show2: @@ -122,7 +122,7 @@ endi system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step -sql create dnode 192.168.0.5 +sql create dnode $hostname5 system sh/exec_up.sh -n dnode5 -s start $x = 0 @@ -197,7 +197,7 @@ if $data3_5 != 1 then endi print ========== step5 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start $x = 0 @@ -225,7 +225,7 @@ endi sleep 8000 print ========== step6 -sql drop dnode 192.168.0.3 +sql drop dnode $hostname3 $x = 0 show6: diff --git a/tests/script/unique/dnode/balancex.sim b/tests/script/unique/dnode/balancex.sim index 78046d36388d3453673c13bac4fe0da61beab31b..b251731c413914beb48ffa37360cccc296d00b0e 100644 --- a/tests/script/unique/dnode/balancex.sim +++ b/tests/script/unique/dnode/balancex.sim @@ -58,7 +58,7 @@ if $data3_1 != 2 then endi print ========== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start $x = 0 @@ -106,7 +106,7 @@ if $data3_2 != 1 then endi print ========== step3 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start $x = 0 @@ -131,7 +131,7 @@ if $data3_3 != 2 then endi print ========== step5 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show5: diff --git a/tests/script/unique/dnode/basic1.sim b/tests/script/unique/dnode/basic1.sim index 1d1f16c7603c09d90672df1a64129787bdd69ce5..43a55b6106fe25cfcaf6914eab4d34298c02753c 100644 --- a/tests/script/unique/dnode/basic1.sim +++ b/tests/script/unique/dnode/basic1.sim @@ -33,7 +33,7 @@ if $data01 != 192.168.0.1 then endi print =============== create dnodes -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sql show dnodes; if $rows != 2 then return -1 diff --git a/tests/script/unique/dnode/monitor_bug.sim b/tests/script/unique/dnode/monitor_bug.sim index a2e650ed717b5bce554b2b4aa7f9feba450204eb..1550e379dc64fd599c535e8c3d8a569cb66df176 100644 --- a/tests/script/unique/dnode/monitor_bug.sim +++ b/tests/script/unique/dnode/monitor_bug.sim @@ -33,7 +33,7 @@ if $data3_1 != 3 then endi print ========== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start $x = 0 diff --git a/tests/script/unique/dnode/offline1.sim b/tests/script/unique/dnode/offline1.sim index 71053f378aedf03db778082e3f2eb305cf4bbdf9..9b307d604ad6ccbf3e34c230a059d821515bd4da 100644 --- a/tests/script/unique/dnode/offline1.sim +++ b/tests/script/unique/dnode/offline1.sim @@ -31,7 +31,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/dnode/offline2.sim b/tests/script/unique/dnode/offline2.sim index 9f265d398acf25ac4f140a26de2dbb82a0c15131..d21e41845968bf096c58597a96e707dbf08bec4e 100644 --- a/tests/script/unique/dnode/offline2.sim +++ b/tests/script/unique/dnode/offline2.sim @@ -31,7 +31,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 3000 @@ -71,9 +71,9 @@ if $data4_192.168.0.2 != offline then endi print ========== step4 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 5000 $x = 0 diff --git a/tests/script/unique/dnode/remove1.sim b/tests/script/unique/dnode/remove1.sim index 5b18c981b4f4c1d366ef89cc1a7697fe7e4cc3c8..721f912914ad58195dc8aa798048417a1b302e36 100644 --- a/tests/script/unique/dnode/remove1.sim +++ b/tests/script/unique/dnode/remove1.sim @@ -58,7 +58,7 @@ if $data3_1 != 2 then endi print ========== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 9000 @@ -89,7 +89,7 @@ if $data3_2 != 1 then endi print ========== step3 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 7001 $x = 0 @@ -105,7 +105,7 @@ print dnode1 openVnodes $data3_1 print dnode2 openVnodes $data3_2 $data5_192.168.0.2 print ========== step4 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start $x = 0 @@ -127,7 +127,7 @@ endi system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step5 -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec_up.sh -n dnode4 -s start $x = 0 diff --git a/tests/script/unique/dnode/remove2.sim b/tests/script/unique/dnode/remove2.sim index 338322fb6e6678a4a44eaf4e4b863e1bfdff633f..1e06c173175b9e18a370640aa4322c1102426581 100644 --- a/tests/script/unique/dnode/remove2.sim +++ b/tests/script/unique/dnode/remove2.sim @@ -58,7 +58,7 @@ if $data3_1 != 2 then endi print ========== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 9000 @@ -90,7 +90,7 @@ endi print ========== step3 system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 7001 $x = 0 @@ -106,7 +106,7 @@ print dnode1 openVnodes $data3_1 print dnode2 openVnodes $data3_2 $data5_192.168.0.2 print ========== step4 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start $x = 0 diff --git a/tests/script/unique/dnode/vnode_clean.sim b/tests/script/unique/dnode/vnode_clean.sim index d670a6b3b7d2069e1dd8dbe9cbe08c5a7e7f34b7..2d55889af1b1ed9af46fa937cf0ef87bfed67993 100644 --- a/tests/script/unique/dnode/vnode_clean.sim +++ b/tests/script/unique/dnode/vnode_clean.sim @@ -49,7 +49,7 @@ if $data3_1 != 3 then endi print ========== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start $x = 0 @@ -91,7 +91,7 @@ if $data3_2 != 2 then endi print ========== step4 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show4: @@ -117,7 +117,7 @@ system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step5 sleep 2000 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 @@ -163,7 +163,7 @@ if $data3_2 != 1 then endi print ========== step7 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec_up.sh -n dnode3 -s start $x = 0 @@ -219,7 +219,7 @@ if $data3_3 != 2 then endi print ========== step9 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 $x = 0 show9: diff --git a/tests/script/unique/import/replica2.sim b/tests/script/unique/import/replica2.sim index ec9bf8d3f5dc925d4142860f10251d120db50d0d..470206942ba1c6a38f2267817dbfafabd4e4d707 100644 --- a/tests/script/unique/import/replica2.sim +++ b/tests/script/unique/import/replica2.sim @@ -35,7 +35,7 @@ system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sql create database ir2db replica 2 days 7 diff --git a/tests/script/unique/import/replica3.sim b/tests/script/unique/import/replica3.sim index 99e46a8506501fd1b95050267eca482392e01ea5..2d07f8ce65049ddd113a819a84bc35633a730903 100644 --- a/tests/script/unique/import/replica3.sim +++ b/tests/script/unique/import/replica3.sim @@ -35,9 +35,9 @@ system sh/exec.sh -n dnode1 -s start sleep 5000 sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start diff --git a/tests/script/unique/metrics/balance_replica1.sim b/tests/script/unique/metrics/balance_replica1.sim index eaa6a14e412eea6b7ddbc47d31ea5e1ca4e5a0e4..2339c4c36f1a89ea4e06f5be36cd836e3d9b4661 100644 --- a/tests/script/unique/metrics/balance_replica1.sim +++ b/tests/script/unique/metrics/balance_replica1.sim @@ -82,7 +82,7 @@ if $dnode2Vnodes != null then goto show1 endi print =============== step3 start dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 8000 diff --git a/tests/script/unique/metrics/dnode2.sim b/tests/script/unique/metrics/dnode2.sim index 449f49b7d7e44b4170238e6fc04b1af1d94669da..c4556d0f0e71bf509d39679ccb4bf63b53c171c6 100644 --- a/tests/script/unique/metrics/dnode2.sim +++ b/tests/script/unique/metrics/dnode2.sim @@ -14,7 +14,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 diff --git a/tests/script/unique/metrics/dnode2_stop.sim b/tests/script/unique/metrics/dnode2_stop.sim index 90af978e6d9cc8f21ee8f356d1b1303ead4937da..93012e53ae8f0dc5ff7d353342a30e0f4c3d5325 100644 --- a/tests/script/unique/metrics/dnode2_stop.sim +++ b/tests/script/unique/metrics/dnode2_stop.sim @@ -13,7 +13,7 @@ system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 diff --git a/tests/script/unique/metrics/dnode3.sim b/tests/script/unique/metrics/dnode3.sim index 44f6687d42b5255bff4e1cca61f6fb91285676d5..9ca7dec33db25e1374e0bf24a068d5c5674feaa9 100644 --- a/tests/script/unique/metrics/dnode3.sim +++ b/tests/script/unique/metrics/dnode3.sim @@ -19,9 +19,9 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start $x = 0 diff --git a/tests/script/unique/metrics/replica2_dnode4.sim b/tests/script/unique/metrics/replica2_dnode4.sim index a1ffb65b0f348e2cab5085fa4cbc962af58eb113..262f7f3a7cb16b106e8a49f531aa235e2695c707 100644 --- a/tests/script/unique/metrics/replica2_dnode4.sim +++ b/tests/script/unique/metrics/replica2_dnode4.sim @@ -24,9 +24,9 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start diff --git a/tests/script/unique/metrics/replica2_vnode3.sim b/tests/script/unique/metrics/replica2_vnode3.sim index aed98aceff1a27e22673d03cd26e9af51d47939d..0611af0b9e2035c41670a48c0e572836665380c6 100644 --- a/tests/script/unique/metrics/replica2_vnode3.sim +++ b/tests/script/unique/metrics/replica2_vnode3.sim @@ -13,7 +13,7 @@ system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 diff --git a/tests/script/unique/metrics/replica3_dnode6.sim b/tests/script/unique/metrics/replica3_dnode6.sim index 974bc793adf1d787347b06aeb7f490eac9218c95..73c67e54c25cfb979e6614f054c7fe1a132aae9e 100644 --- a/tests/script/unique/metrics/replica3_dnode6.sim +++ b/tests/script/unique/metrics/replica3_dnode6.sim @@ -38,11 +38,11 @@ system sh/cfg.sh -n dnode6 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 -sql create dnode 192.168.0.5 -sql create dnode 192.168.0.6 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 +sql create dnode $hostname5 +sql create dnode $hostname6 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start diff --git a/tests/script/unique/metrics/replica3_vnode3.sim b/tests/script/unique/metrics/replica3_vnode3.sim index 379b7357c772b77551626df79548e2a3e961b9ca..006b01bc744fb8e4348e7e9e55117f6ba3cb1344 100644 --- a/tests/script/unique/metrics/replica3_vnode3.sim +++ b/tests/script/unique/metrics/replica3_vnode3.sim @@ -24,9 +24,9 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start diff --git a/tests/script/unique/mnode/mgmt22.sim b/tests/script/unique/mnode/mgmt22.sim index 9fda0f108967eaeda99e96b7739c7f1201f354cb..05e636d0de03aea44eb79eb7bc20f1b3e4376730 100644 --- a/tests/script/unique/mnode/mgmt22.sim +++ b/tests/script/unique/mnode/mgmt22.sim @@ -41,7 +41,7 @@ if $data2_2 != slave then endi print ============== step3 -sql_error drop dnode 192.168.0.1 -x error1 +sql_error drop dnode $hostname1 -x error1 print should not drop master print ============== step4 @@ -50,7 +50,7 @@ sql_error show mnodes print error of no master print ============== step5 -sql_error drop dnode 192.168.0.1 +sql_error drop dnode $hostname1 print error of no master print ============== step6 @@ -79,7 +79,7 @@ endi print ============== step7 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 5000 $x = 0 @@ -93,7 +93,7 @@ show7: sql show mnodes print dnode1 ==> $data2_1 print dnode2 ==> $data2_2 -print dnode3 ==> $data3_3 +print dnode3 ==> $data2_3 if $data2_1 != master then goto show7 endi diff --git a/tests/script/unique/mnode/mgmt23.sim b/tests/script/unique/mnode/mgmt23.sim index 6e2f0c8f56d914002b1e8d5f50334effe2ef249a..07f8894769c2275364b2c8f209701b6ad83b67b3 100644 --- a/tests/script/unique/mnode/mgmt23.sim +++ b/tests/script/unique/mnode/mgmt23.sim @@ -20,7 +20,7 @@ endi print ============== step2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 $x = 0 show2: @@ -42,13 +42,13 @@ endi print ============== step3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -64,13 +64,13 @@ if $dnode3Role != null then endi print ============== step4 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -89,16 +89,16 @@ system sh/exec_up.sh -n dnode2 -s stop print ============== step5 sleep 2000 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 system sh/exec_up.sh -n dnode2 -s start sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -120,7 +120,7 @@ sleep 10000 sql_error show mnodes print ============== step7 -sql_error drop dnode 192.168.0.1 +sql_error drop dnode $hostname1 system sh/exec_up.sh -n dnode1 -s stop system sh/exec_up.sh -n dnode2 -s stop diff --git a/tests/script/unique/mnode/mgmt24.sim b/tests/script/unique/mnode/mgmt24.sim index 22454c8b5f093419364853e165639523b6926070..35985345043d172c79d2c453eeddcd1785b5bcd5 100644 --- a/tests/script/unique/mnode/mgmt24.sim +++ b/tests/script/unique/mnode/mgmt24.sim @@ -20,7 +20,7 @@ endi print ============== step2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 $x = 0 show2: @@ -45,11 +45,11 @@ system sh/exec_up.sh -n dnode1 -s stop sql_error show mnodes print ============== step4 -sql_error drop dnode 192.168.0.1 +sql_error drop dnode $hostname1 print ============== step5 system sh/exec_up.sh -n dnode1 -s start -sql_error create dnode 192.168.0.1 +sql_error create dnode $hostname1 sql close sql connect diff --git a/tests/script/unique/mnode/mgmt25.sim b/tests/script/unique/mnode/mgmt25.sim index 652492db45cfe1060e43c5d7c560f6522d7324b8..cedfad4bd0b476d79bcbac4ca491612c122adbf1 100644 --- a/tests/script/unique/mnode/mgmt25.sim +++ b/tests/script/unique/mnode/mgmt25.sim @@ -20,7 +20,7 @@ endi print ============== step2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 $x = 0 show2: @@ -42,13 +42,13 @@ endi print ============== step3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 6000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -64,13 +64,13 @@ if $dnode3Role != null then endi print ============== step4 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 6000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role diff --git a/tests/script/unique/mnode/mgmt26.sim b/tests/script/unique/mnode/mgmt26.sim index 5ad095db0b61a33190be515f8fd5f8f4b59bd972..105e753634ba003bbb89f796aa54919baaff9205 100644 --- a/tests/script/unique/mnode/mgmt26.sim +++ b/tests/script/unique/mnode/mgmt26.sim @@ -20,7 +20,7 @@ endi print ============== step2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 $x = 0 show2: @@ -42,13 +42,13 @@ endi print ============== step3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 6000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -65,13 +65,13 @@ endi print ============== step4 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 6000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -92,13 +92,13 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 sleep 5000 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 6000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role diff --git a/tests/script/unique/mnode/mgmt33.sim b/tests/script/unique/mnode/mgmt33.sim index de28dc41a2ad5e38fcc092e73e09ca5aa3c53e35..df0a289ab76a29e63658ec583aa2df3b091ea74c 100644 --- a/tests/script/unique/mnode/mgmt33.sim +++ b/tests/script/unique/mnode/mgmt33.sim @@ -27,13 +27,13 @@ endi print ============== step2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -50,13 +50,13 @@ endi print ============== step3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -72,13 +72,13 @@ if $dnode3Role != slave then endi print ============== step4 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -101,13 +101,13 @@ system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 system sh/exec_up.sh -n dnode2 -s start print ============== step5 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 +$dnode1Role = $data2_1 $dnode2Role = $data3_4 -$dnode3Role = $data3_3 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -127,9 +127,9 @@ system sh/exec_up.sh -n dnode1 -s stop sleep 10000 sql show mnodes -$dnode1Role = $data3_1 +$dnode1Role = $data2_1 $dnode2Role = $data3_4 -$dnode3Role = $data3_3 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -145,13 +145,13 @@ endi #endi print ============== step7 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role diff --git a/tests/script/unique/mnode/mgmt34.sim b/tests/script/unique/mnode/mgmt34.sim index 2ba090fe9e86392370369abb8d854b34d6ee3dc8..7350c8b8086eda5f9a3e2ca41bf37d8dc6a31efa 100644 --- a/tests/script/unique/mnode/mgmt34.sim +++ b/tests/script/unique/mnode/mgmt34.sim @@ -36,14 +36,14 @@ endi print ============== step2 system sh/exec_up.sh -n dnode2 -s start -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -64,14 +64,14 @@ endi print ============== step3 system sh/exec_up.sh -n dnode3 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -93,14 +93,14 @@ endi print ============== step4 system sh/exec_up.sh -n dnode4 -s start -sql create dnode 192.168.0.4 +sql create dnode $hostname4 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -120,14 +120,14 @@ if $dnode4Role != null then endi print ============== step5 -sql drop dnode 192.168.0.2 +sql drop dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -154,14 +154,14 @@ system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 system sh/exec_up.sh -n dnode2 -s start print ============== step6 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -185,10 +185,10 @@ system sh/exec_up.sh -n dnode1 -s stop sleep 4000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -199,14 +199,14 @@ if $dnode1Role != offline then endi print ============== step8 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 sleep 8000 sql show mnodes -$dnode1Role = $data3_1 +$dnode1Role = $data2_1 $dnode2Role = $data3_5 -$dnode3Role = $data3_3 -$dnode4Role = $data3_4 +$dnode3Role = $data2_3 +$dnode4Role = $data2_4 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role diff --git a/tests/script/unique/mnode/mgmtr2.sim b/tests/script/unique/mnode/mgmtr2.sim index 60907c90baf1d7d1abc04d1b82967564ba49839e..097d5109296eb1447b5d3b8d5960b27cb0437518 100644 --- a/tests/script/unique/mnode/mgmtr2.sim +++ b/tests/script/unique/mnode/mgmtr2.sim @@ -13,9 +13,9 @@ sql connect sleep 3000 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role @@ -31,9 +31,9 @@ if $dnode3Role != null then endi print ============== step2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 sleep 1700 -sql create dnode 192.168.0.3 +sql create dnode $hostname3 print ============== step3 print ========= start dnode2 and dnode3 @@ -58,9 +58,9 @@ system sh/exec_up.sh -n dnode3 -s start print ============== step4 sql show mnodes -$dnode1Role = $data3_1 -$dnode2Role = $data3_2 -$dnode3Role = $data3_3 +$dnode1Role = $data2_1 +$dnode2Role = $data2_2 +$dnode3Role = $data2_3 print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role diff --git a/tests/script/unique/mnode/secondIp.sim b/tests/script/unique/mnode/secondIp.sim index ae339c3d21de803b8e6ba3c8a78608a9c91a9aee..71c2cdfb769d57c72d7b281589982d31ac2e5659 100644 --- a/tests/script/unique/mnode/secondIp.sim +++ b/tests/script/unique/mnode/secondIp.sim @@ -7,7 +7,7 @@ system sh/exec_up.sh -n dnode2 -s start sql connect print ========== step2 connect to dnode2 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 system sh/exec_up.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/unique/stream/metrics_balance.sim b/tests/script/unique/stream/metrics_balance.sim index 86137f8d1351f5edbd8fd9206ac91594df808e47..48702d584cc9a412dbb87a9cb9d71b02d009b64b 100644 --- a/tests/script/unique/stream/metrics_balance.sim +++ b/tests/script/unique/stream/metrics_balance.sim @@ -201,7 +201,7 @@ if $dnode2Vnodes != null then endi print =============== step4 start dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 8000 diff --git a/tests/script/unique/stream/metrics_replica1_dnode2.sim b/tests/script/unique/stream/metrics_replica1_dnode2.sim index c2a3c813c322d556cd83090f2ea8b224a5a93c53..f932f601ff3b29d8a7b8cf7b38bf170f8d3aad7e 100644 --- a/tests/script/unique/stream/metrics_replica1_dnode2.sim +++ b/tests/script/unique/stream/metrics_replica1_dnode2.sim @@ -14,7 +14,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/metrics_replica2_dnode2.sim b/tests/script/unique/stream/metrics_replica2_dnode2.sim index d5631be8d46620872a2fa25fb13820119dc46845..ba90d8b8334951285ffa573b3bc6127a555e50ce 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode2.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode2.sim @@ -10,7 +10,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim index 6e3baf424c6835abad13cbc7679a8727601270c7..d0ef82b6a0d11f76adad3d12823b5186fe1fc66d 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim @@ -14,7 +14,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/metrics_replica2_dnode3.sim b/tests/script/unique/stream/metrics_replica2_dnode3.sim index a5756e711c4c7c494c1463181587b1213a5dd906..fc4b45405947dffa039eaaa0a77ee6fd58759ea1 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode3.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode3.sim @@ -19,9 +19,9 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/metrics_replica3_dnode4.sim b/tests/script/unique/stream/metrics_replica3_dnode4.sim index 7451347186178a2a076f11fddf0f4974246c59f0..90f9ed16ed2f269eeb92a7f0175f39104f3d7abf 100644 --- a/tests/script/unique/stream/metrics_replica3_dnode4.sim +++ b/tests/script/unique/stream/metrics_replica3_dnode4.sim @@ -24,11 +24,11 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start $x = 0 diff --git a/tests/script/unique/stream/metrics_vnode_stop.sim b/tests/script/unique/stream/metrics_vnode_stop.sim index 20236276ea7aece0887a46cf82bf297f1c5a7e7e..71a085454b0f66336422e7d0b37c0f05ffa59af8 100644 --- a/tests/script/unique/stream/metrics_vnode_stop.sim +++ b/tests/script/unique/stream/metrics_vnode_stop.sim @@ -12,7 +12,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: @@ -114,7 +114,7 @@ connectTbase2: sql connect -x connectTbase2 sleep 3000 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 system sh/exec.sh -n dnode1 -s start sleep 3000 print ======================== dnode start diff --git a/tests/script/unique/stream/table_balance.sim b/tests/script/unique/stream/table_balance.sim index 9bf9b9ed47036232952436093d1745ecbb85920d..2736b223b6b86d8ebc600d6b39bbd2984fc1d869 100644 --- a/tests/script/unique/stream/table_balance.sim +++ b/tests/script/unique/stream/table_balance.sim @@ -136,7 +136,7 @@ if $dnode2Vnodes != null then endi print =============== step4 start dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 8000 diff --git a/tests/script/unique/stream/table_move.sim b/tests/script/unique/stream/table_move.sim index fd03426dd55e5458404fc0ad513d7d2ffad61f91..b677aa95f006b74ba1c7419fdabccf60f45bd29e 100644 --- a/tests/script/unique/stream/table_move.sim +++ b/tests/script/unique/stream/table_move.sim @@ -173,7 +173,7 @@ if $dnode2Vnodes != null then endi print =============== step4 start dnode2 -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 8000 @@ -202,7 +202,7 @@ system sh/exec.sh -n dnode1 -s stop print stop dnode1 and sleep 10000 sleep 10000 -sql drop dnode 192.168.0.1 +sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 diff --git a/tests/script/unique/stream/table_replica1_dnode2.sim b/tests/script/unique/stream/table_replica1_dnode2.sim index f087b815feaf614da4c55f79eeba504aaff36f7d..0640de11b35d7cd7607ee159ebd0bd9763a69e89 100644 --- a/tests/script/unique/stream/table_replica1_dnode2.sim +++ b/tests/script/unique/stream/table_replica1_dnode2.sim @@ -14,7 +14,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/table_replica2_dnode2.sim b/tests/script/unique/stream/table_replica2_dnode2.sim index d35039f61754370ad0647ee20e427f272d4f2c3a..2b9d22d150ac787469dad7361c1b96f652bdb741 100644 --- a/tests/script/unique/stream/table_replica2_dnode2.sim +++ b/tests/script/unique/stream/table_replica2_dnode2.sim @@ -10,7 +10,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim index 581a4ab06b3472fe925e5b04e33dba9883e2528c..917d6935e8d2f0462bd4f71c09a112069c12264f 100644 --- a/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim @@ -14,7 +14,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/table_replica2_dnode3.sim b/tests/script/unique/stream/table_replica2_dnode3.sim index 302b006b21af115e16dae317d702b029ebbc28d2..28d40d237e6805263a13b0a2e704eb4ded91d7e2 100644 --- a/tests/script/unique/stream/table_replica2_dnode3.sim +++ b/tests/script/unique/stream/table_replica2_dnode3.sim @@ -20,9 +20,9 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/table_replica3_dnode4.sim b/tests/script/unique/stream/table_replica3_dnode4.sim index 5fbd27ad42f5398b7450c51cead9377b5c2a3aec..b6d76c3719b2a19eeac4bf85a408a9392cea5458 100644 --- a/tests/script/unique/stream/table_replica3_dnode4.sim +++ b/tests/script/unique/stream/table_replica3_dnode4.sim @@ -24,11 +24,11 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start -sql create dnode 192.168.0.4 +sql create dnode $hostname4 system sh/exec.sh -n dnode4 -s start $x = 0 createDnode: diff --git a/tests/script/unique/stream/table_vnode_stop.sim b/tests/script/unique/stream/table_vnode_stop.sim index 05ad2d6a5ff5292e507e5b19068298345390cd8c..fe7165a16670099acc3784c05c6598c10f953ea9 100644 --- a/tests/script/unique/stream/table_vnode_stop.sim +++ b/tests/script/unique/stream/table_vnode_stop.sim @@ -12,7 +12,7 @@ system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start $x = 0 createDnode: @@ -115,7 +115,7 @@ connectTbase2: sql connect -x connectTbase2 sleep 3000 -sql create dnode 192.168.0.1 +sql create dnode $hostname1 system sh/exec.sh -n dnode1 -s start sleep 3000 print ======================== dnode start diff --git a/tests/script/unique/table/delete_part.sim b/tests/script/unique/table/delete_part.sim index 189bd6c43182b747093e41fd83b4105c56789ba3..4766be5131b649c354a725cba62318cbfc0f2b36 100644 --- a/tests/script/unique/table/delete_part.sim +++ b/tests/script/unique/table/delete_part.sim @@ -37,7 +37,7 @@ system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/vnode/backup/replica4.sim b/tests/script/unique/vnode/backup/replica4.sim index 5334b21d53c3a5658db5deb50e145dac2948189f..afddf58b80e9d872f420b26014cf7353988ddd6c 100644 --- a/tests/script/unique/vnode/backup/replica4.sim +++ b/tests/script/unique/vnode/backup/replica4.sim @@ -25,9 +25,9 @@ connectTbase: endi sql connect -x connectTbase -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start diff --git a/tests/script/unique/vnode/backup/replica5.sim b/tests/script/unique/vnode/backup/replica5.sim index e2e45c0e259bafefe530788623d419bf21ffb00b..32d30c110cb84a46d1291735b43ab71cc4c1fcca 100644 --- a/tests/script/unique/vnode/backup/replica5.sim +++ b/tests/script/unique/vnode/backup/replica5.sim @@ -29,10 +29,10 @@ connectTbase: endi sql connect -x connectTbase -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 -sql create dnode 192.168.0.5 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 +sql create dnode $hostname5 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start diff --git a/tests/script/unique/vnode/commit.sim b/tests/script/unique/vnode/commit.sim index 67f6f027b8033fd790e121b98fa648c8c34dd416..41c9c5ae1ed4ffdc415c4501db8baa6b775d76ee 100644 --- a/tests/script/unique/vnode/commit.sim +++ b/tests/script/unique/vnode/commit.sim @@ -10,7 +10,7 @@ system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/vnode/many.sim b/tests/script/unique/vnode/many.sim index ca1475190c14c9c8a746910f09d950726c7723de..394122a626d923f707e7cd9be01644bd728795fa 100644 --- a/tests/script/unique/vnode/many.sim +++ b/tests/script/unique/vnode/many.sim @@ -26,8 +26,8 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/vnode/replica2_basic.sim b/tests/script/unique/vnode/replica2_basic.sim index 29268737500a815783f38ab2c720beb3acfb71b8..bf501a11dfdb8c757b3da5197a8f67c6b742d423 100644 --- a/tests/script/unique/vnode/replica2_basic.sim +++ b/tests/script/unique/vnode/replica2_basic.sim @@ -10,7 +10,7 @@ system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start sleep 3000 diff --git a/tests/script/unique/vnode/replica2_basic2.sim b/tests/script/unique/vnode/replica2_basic2.sim index 0380dfa58870285fc7fc426fd5a8a88527e91307..046d2d059c4088d49d088bf7c21f068f15e82876 100644 --- a/tests/script/unique/vnode/replica2_basic2.sim +++ b/tests/script/unique/vnode/replica2_basic2.sim @@ -32,9 +32,9 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 +sql create dnode $hostname2 system sh/exec.sh -n dnode2 -s start -sql create dnode 192.168.0.3 +sql create dnode $hostname3 system sh/exec.sh -n dnode3 -s start sleep 3000 @@ -77,9 +77,9 @@ if $rows != 1 then endi sql show dnodes -print dnode192.168.0.1 ==> openVnodes: $data2_192.168.0.1 freeVnodes: $data3_192.168.0.1 -print dnode192.168.0.2 ==> openVnodes: $data2_192.168.0.2 freeVnodes: $data3_192.168.0.2 -print dnode192.168.0.3 ==> openVnodes: $data2_192.168.0.3 freeVnodes: $data3_192.168.0.3 +print dnode1 ==> openVnodes: $data2_192.168.0.1 freeVnodes: $data3_192.168.0.1 +print dnode2 ==> openVnodes: $data2_192.168.0.2 freeVnodes: $data3_192.168.0.2 +print dnode3 ==> openVnodes: $data2_192.168.0.3 freeVnodes: $data3_192.168.0.3 if $data2_192.168.0.1 != 0 then return -1 diff --git a/tests/script/unique/vnode/replica2_repeat.sim b/tests/script/unique/vnode/replica2_repeat.sim index d8d5c4089eeaece651eb14dae672284f107003ce..1383a3c2a1aaebe90740d7bc749a224e2747fe2f 100644 --- a/tests/script/unique/vnode/replica2_repeat.sim +++ b/tests/script/unique/vnode/replica2_repeat.sim @@ -22,8 +22,8 @@ system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/vnode/replica3_basic.sim b/tests/script/unique/vnode/replica3_basic.sim index 858c570fc43d21fadf6047a63fb9d33ebd6028f2..1e857881d8a66cb059f839b475d96c218f86b81f 100644 --- a/tests/script/unique/vnode/replica3_basic.sim +++ b/tests/script/unique/vnode/replica3_basic.sim @@ -14,8 +14,8 @@ system sh/cfg.sh -n dnode3 -c numofMpeers -v 3 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/unique/vnode/replica3_repeat.sim b/tests/script/unique/vnode/replica3_repeat.sim index afdcda0dcffc8eddcaaeae59e5da97383d089037..0aecc144c365db424b65c0ab58c6af67ef06db8a 100644 --- a/tests/script/unique/vnode/replica3_repeat.sim +++ b/tests/script/unique/vnode/replica3_repeat.sim @@ -23,9 +23,9 @@ system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 -sql create dnode 192.168.0.4 +sql create dnode $hostname2 +sql create dnode $hostname3 +sql create dnode $hostname4 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode4 -s start diff --git a/tests/script/unique/vnode/replica3_vgroup.sim b/tests/script/unique/vnode/replica3_vgroup.sim index 50fa40629dd0cc5e808c22b80d751162cf8609fe..34dff5415dbac87ab24f635f9f53c24d2ee08a46 100644 --- a/tests/script/unique/vnode/replica3_vgroup.sim +++ b/tests/script/unique/vnode/replica3_vgroup.sim @@ -14,8 +14,8 @@ system sh/cfg.sh -n dnode3 -c numofMpeers -v 3 system sh/exec.sh -n dnode1 -s start sql connect -sql create dnode 192.168.0.2 -sql create dnode 192.168.0.3 +sql create dnode $hostname2 +sql create dnode $hostname3 system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sleep 3000 diff --git a/tests/script/windows/account/authority.sim b/tests/script/windows/account/authority.sim index f1a89ca70473359bf4eca104f1985f8e73570ea4..a352faf23bc9ea2979abcb337c8bae6794b91890 100644 --- a/tests/script/windows/account/authority.sim +++ b/tests/script/windows/account/authority.sim @@ -70,11 +70,11 @@ sql alter user read pass 'taosdata' -x step23 return -1 step23: -sql create dnode 192.168.0.2 -x step24 +sql create dnode $hostname2 -x step24 return -1 step24: -sql drop dnode 192.168.0.2 -x step25 +sql drop dnode $hostname2 -x step25 return -1 step25: