Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dgr6878
TDengine
提交
def56681
T
TDengine
项目概览
dgr6878
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
def56681
编写于
4月 20, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-148] add test scripts
上级
be8ea454
变更
17
显示空白变更内容
内联
并排
Showing
17 changed file
with
236 addition
and
848 deletion
+236
-848
src/mnode/src/mgmtDnode.c
src/mnode/src/mgmtDnode.c
+19
-28
tests/script/unique/mnode/basic1.sim
tests/script/unique/mnode/basic1.sim
+0
-15
tests/script/unique/mnode/drop.sim
tests/script/unique/mnode/drop.sim
+0
-96
tests/script/unique/mnode/mgmt22.sim
tests/script/unique/mnode/mgmt22.sim
+23
-67
tests/script/unique/mnode/mgmt23.sim
tests/script/unique/mnode/mgmt23.sim
+27
-63
tests/script/unique/mnode/mgmt24.sim
tests/script/unique/mnode/mgmt24.sim
+20
-52
tests/script/unique/mnode/mgmt25.sim
tests/script/unique/mnode/mgmt25.sim
+16
-17
tests/script/unique/mnode/mgmt26.sim
tests/script/unique/mnode/mgmt26.sim
+21
-42
tests/script/unique/mnode/mgmt33.sim
tests/script/unique/mnode/mgmt33.sim
+33
-34
tests/script/unique/mnode/mgmt34.sim
tests/script/unique/mnode/mgmt34.sim
+45
-45
tests/script/unique/mnode/mgmtr1.sim
tests/script/unique/mnode/mgmtr1.sim
+0
-107
tests/script/unique/mnode/mgmtr2.sim
tests/script/unique/mnode/mgmtr2.sim
+17
-17
tests/script/unique/mnode/reuse.sim
tests/script/unique/mnode/reuse.sim
+0
-97
tests/script/unique/mnode/secondIp.sim
tests/script/unique/mnode/secondIp.sim
+14
-7
tests/script/unique/mnode/tcp_mgmt22.sim
tests/script/unique/mnode/tcp_mgmt22.sim
+0
-155
tests/script/unique/mnode/testSuite.sim
tests/script/unique/mnode/testSuite.sim
+0
-3
tests/script/unique/testSuite.sim
tests/script/unique/testSuite.sim
+1
-3
未找到文件。
src/mnode/src/mgmtDnode.c
浏览文件 @
def56681
...
...
@@ -22,6 +22,7 @@
#include "ttime.h"
#include "tutil.h"
#include "tsocket.h"
#include "tbalance.h"
#include "dnode.h"
#include "mgmtDef.h"
#include "mgmtLog.h"
...
...
@@ -98,6 +99,9 @@ static int32_t mgmtDnodeActionDelete(SSdbOper *pOper) {
}
}
mgmtDropMnode
(
pDnode
->
dnodeId
);
balanceNotify
();
mTrace
(
"dnode:%d, all vgroups:%d is dropped from sdb"
,
pDnode
->
dnodeId
,
numOfVgroups
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -432,7 +436,7 @@ static int32_t mgmtDropDnodeByIp(uint32_t ip) {
SDnodeObj
*
pDnode
=
mgmtGetDnodeByIp
(
ip
);
if
(
pDnode
==
NULL
)
{
mError
(
"dnode:%s, is not exist"
,
taosIpStr
(
ip
));
return
TSDB_CODE_
INVALID_VALUE
;
return
TSDB_CODE_
DNODE_NOT_EXIST
;
}
if
(
pDnode
->
privateIp
==
dnodeGetMnodeMasteIp
())
{
...
...
@@ -514,18 +518,6 @@ static int32_t mgmtGetDnodeMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pCo
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
8
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
strcpy
(
pSchema
[
cols
].
name
,
"create time"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
10
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"status"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
2
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_SMALLINT
;
strcpy
(
pSchema
[
cols
].
name
,
"open vnodes"
);
...
...
@@ -538,13 +530,17 @@ static int32_t mgmtGetDnodeMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pCo
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
#ifdef _VPEER
pShow
->
bytes
[
cols
]
=
18
;
pShow
->
bytes
[
cols
]
=
10
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"balance"
);
strcpy
(
pSchema
[
cols
].
name
,
"status"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
8
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
strcpy
(
pSchema
[
cols
].
name
,
"create time"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
#endif
pMeta
->
numOfColumns
=
htons
(
cols
);
pShow
->
numOfColumns
=
cols
;
...
...
@@ -591,26 +587,21 @@ static int32_t mgmtRetrieveDnodes(SShowObj *pShow, char *data, int32_t rows, voi
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int
64_t
*
)
pWrite
=
pDnode
->
createdTime
;
*
(
int
16_t
*
)
pWrite
=
pDnode
->
openVnodes
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
strcpy
(
pWrite
,
mgmtGetDnodeStatusStr
(
pDnode
->
status
))
;
*
(
int16_t
*
)
pWrite
=
pDnode
->
totalVnodes
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int16_t
*
)
pWrite
=
pDnode
->
openVnodes
;
strcpy
(
pWrite
,
mgmtGetDnodeStatusStr
(
pDnode
->
status
))
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
int
16_t
*
)
pWrite
=
pDnode
->
totalVnodes
;
*
(
int
64_t
*
)
pWrite
=
pDnode
->
createdTime
;
cols
++
;
#ifdef _VPEER
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
strcpy
(
pWrite
,
mgmtGetDnodeStatusStr
(
pDnode
->
status
));
cols
++
;
#endif
numOfRows
++
;
mgmtReleaseDnode
(
pDnode
);
...
...
tests/script/unique/mnode/basic1.sim
已删除
100644 → 0
浏览文件 @
be8ea454
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/deploy.sh -n dnode3 -m 192.168.0.1 -i 192.168.0.3
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3
system sh/exec_up.sh -n dnode1 -s start
system sh/exec_up.sh -n dnode2 -s start
sql connect
sleep 2000
sql create dnode 192.168.0.2
tests/script/unique/mnode/drop.sim
已删除
100644 → 0
浏览文件 @
be8ea454
system sh/stop_dnodes.sh
system sh/ip.sh -i 1 -s up
system sh/ip.sh -i 2 -s up
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != master then
return -1
endi
if $data3_192.168.0.2 != null then
return -1
endi
$y = 1
step1:
print ============== step2
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
system sh/exec.sh -n dnode2 -s start
sql create dnode 192.168.0.2
$x = 0
show2:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != master then
goto show2
endi
if $data3_192.168.0.2 != slave then
goto show2
endi
print ============== step3
sql drop dnode 192.168.0.2
$x = 0
show4:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != master then
goto show4
endi
if $data3_192.168.0.2 != null then
goto show4
endi
sql show dnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != 4 then
goto show4
endi
if $data3_192.168.0.2 != null then
goto show4
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 2000
$y = $y + 1
print ===> loop times: $y
if $y < 10 then
goto step1
endi
\ No newline at end of file
tests/script/unique/mnode/mgmt22.sim
浏览文件 @
def56681
...
...
@@ -18,13 +18,12 @@ system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec_up.sh -n dnode1 -s start
sleep 3000
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
return -1
endi
...
...
@@ -41,73 +40,30 @@ show2:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
goto show2
endi
if $data3_
192.168.0.
2 != slave then
if $data3_2 != slave then
goto show2
endi
print ============== step3
sql drop dnode 192.168.0.1 -x error1
print should not drop master
return -1
error1:
sql_error drop dnode 192.168.0.1 -x error1
print should not drop master
print ============== step4
system sh/exec_up.sh -n dnode1 -s stop
sleep 8000
$x = 0
show4:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != undecided then
goto show4
endi
if $data3_192.168.0.2 != master then
goto show4
endi
sql_error show mnodes
print error of no master
print ============== step5
sql drop dnode 192.168.0.1
sleep 8000
$x = 0
show5:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != null then
goto show5
endi
if $data3_192.168.0.2 != master then
goto show5
endi
sql_error drop dnode 192.168.0.1
print error of no master
print ============== step6
system sh/deploy.sh -n dnode1 -m 192.168.0.2 -i 192.168.0.1
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.1
system sh/exec_up.sh -n dnode1 -s start
sql create dnode 192.168.0.1
sleep 5000
$x = 0
show6:
...
...
@@ -118,12 +74,12 @@ show6:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1 != slave
then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1
!= master
then
goto show6
endi
if $data3_
192.168.0.2 != master
then
if $data3_
2 != slave
then
goto show6
endi
...
...
@@ -141,15 +97,15 @@ show7:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
print 192.168.0.3 ==> $data3_
192.168.0.
3
if $data3_1
92.168.0.1 != slave
then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
print 192.168.0.3 ==> $data3_3
if $data3_1
!= master
then
goto show7
endi
if $data3_
192.168.0.2 != master
then
if $data3_
2 != slave
then
goto show7
endi
if $data3_
192.168.0.
3 != null then
if $data3_3 != null then
goto show7
endi
tests/script/unique/mnode/mgmt23.sim
浏览文件 @
def56681
...
...
@@ -17,19 +17,18 @@ system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
$x = 0
...
...
@@ -41,24 +40,24 @@ show2:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
goto show2
endi
if $data3_
192.168.0.
2 != slave then
if $data3_2 != slave then
goto show2
endi
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sql create dnode 192.168.0.3
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -78,9 +77,9 @@ sql drop dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -95,7 +94,7 @@ if $dnode3Role != slave then
return -1
endi
system sh/exec.sh -n dnode2 -s stop
system sh/exec
_up
.sh -n dnode2 -s stop
print ============== step5
sleep 2000
...
...
@@ -103,13 +102,13 @@ sql create dnode 192.168.0.2
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.3
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -125,49 +124,14 @@ if $dnode3Role != slave then
endi
print ============== step6
system sh/exec.sh -n dnode1 -s stop
system sh/exec
_up
.sh -n dnode1 -s stop
sleep 10000
sql show mnodes
$dnode1Role = $data3_192.168.0.1
$dnode2Role = $data3_192.168.0.2
$dnode3Role = $data3_192.168.0.3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
if $dnode1Role != undecided then
return -1
endi
if $dnode2Role != null then
return -1
endi
if $dnode3Role != master then
return -1
endi
sql_error show mnodes
print ============== step7
sql drop dnode 192.168.0.1
sleep 8000
sql show mnodes
$dnode1Role = $data3_192.168.0.1
$dnode2Role = $data3_192.168.0.2
$dnode3Role = $data3_192.168.0.3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
if $dnode1Role != null then
return -1
endi
if $dnode2Role != slave then
return -1
endi
if $dnode3Role != master then
return -1
endi
sql_error drop dnode 192.168.0.1
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
\ No newline at end of file
system sh/exec_up.sh -n dnode1 -s stop
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode3 -s stop
\ No newline at end of file
tests/script/unique/mnode/mgmt24.sim
浏览文件 @
def56681
...
...
@@ -17,19 +17,18 @@ system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
$x = 0
...
...
@@ -41,57 +40,25 @@ show2:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
goto show2
endi
if $data3_
192.168.0.
2 != slave then
if $data3_2 != slave then
goto show2
endi
print ============== step3
system sh/exec.sh -n dnode1 -s stop
sleep 8000
sql show mnodes
$dnode1Role = $data3_192.168.0.1
$dnode2Role = $data3_192.168.0.2
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
if $dnode1Role != undecided then
return -1
endi
if $dnode2Role != master then
return -1
endi
system sh/exec_up.sh -n dnode1 -s stop
sql_error show mnodes
print ============== step4
sql drop dnode 192.168.0.1
sleep 6000
sql show mnodes
$dnode1Role = $data3_192.168.0.1
$dnode2Role = $data3_192.168.0.2
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
if $dnode1Role != null then
return -1
endi
if $dnode2Role != master then
return -1
endi
sql_error drop dnode 192.168.0.1
print ============== step5
system sh/deploy.sh -n dnode1 -m 192.168.0.2 -i 192.168.0.1
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.1
system sh/exec.sh -n dnode1 -s start
sql create dnode 192.168.0.1
sql show mnodes
system sh/exec_up.sh -n dnode1 -s start
sql_error create dnode 192.168.0.1
$x = 0
step5:
...
...
@@ -101,12 +68,13 @@ step5:
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != slave then
sql show mnodes -x step5
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
goto step5
endi
if $data3_
192.168.0.2 != master
then
if $data3_
2 != slave
then
goto step5
endi
\ No newline at end of file
tests/script/unique/mnode/mgmt25.sim
浏览文件 @
def56681
...
...
@@ -17,19 +17,18 @@ system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
$x = 0
...
...
@@ -41,24 +40,24 @@ show2:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
goto show2
endi
if $data3_
192.168.0.
2 != slave then
if $data3_2 != slave then
goto show2
endi
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sql create dnode 192.168.0.3
sleep 6000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -78,9 +77,9 @@ sql drop dnode 192.168.0.2
sleep 6000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
tests/script/unique/mnode/mgmt26.sim
浏览文件 @
def56681
...
...
@@ -17,19 +17,18 @@ system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
$x = 0
...
...
@@ -41,24 +40,24 @@ show2:
endi
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
if $data3_1 != master then
goto show2
endi
if $data3_
192.168.0.
2 != slave then
if $data3_2 != slave then
goto show2
endi
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sql create dnode 192.168.0.3
sleep 6000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -79,9 +78,9 @@ sql drop dnode 192.168.0.2
sleep 6000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -97,19 +96,19 @@ if $dnode3Role != slave then
endi
print ============== step5
system sh/exec.sh -n dnode2 -s stop
system sh/exec
_up
.sh -n dnode2 -s stop
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.3
sleep 5000
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
sleep 6000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -124,23 +123,3 @@ if $dnode3Role != slave then
return -1
endi
print ============== step6
system sh/exec.sh -n dnode1 -s stop
sleep 10000
sql drop dnode 192.168.0.1
sleep 12000
sql show mnodes
$dnode1Role = $data3_192.168.0.1
$dnode2Role = $data3_192.168.0.2
$dnode3Role = $data3_192.168.0.3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
if $dnode2Role != slave then
return -1
endi
if $dnode3Role != master then
return -1
endi
tests/script/unique/mnode/mgmt33.sim
浏览文件 @
def56681
...
...
@@ -17,33 +17,32 @@ system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.2
print ============== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
print 192.168.0.3 ==> $data3_
192.168.0.
3
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
print 192.168.0.3 ==> $data3_3
if $data3_1 != master then
return -1
endi
if $data3_
192.168.0.
2 != null then
if $data3_2 != null then
return -1
endi
if $data3_
192.168.0.
3 != null then
if $data3_3 != null then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -59,14 +58,14 @@ if $dnode3Role != null then
endi
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sql create dnode 192.168.0.3
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -86,9 +85,9 @@ sql drop dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -103,22 +102,22 @@ if $dnode3Role != slave then
return -1
endi
system sh/exec.sh -n dnode2 -s stop
system sh/exec
_up
.sh -n dnode2 -s stop
sleep 3000
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.3
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
print ============== step5
sql create dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -134,13 +133,13 @@ if $dnode3Role != slave then
endi
print ============== step6
system sh/exec.sh -n dnode1 -s stop
system sh/exec
_up
.sh -n dnode1 -s stop
sleep 10000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -160,9 +159,9 @@ sql drop dnode 192.168.0.1
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -177,6 +176,6 @@ endi
# return -1
#endi
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
\ No newline at end of file
system sh/exec_up.sh -n dnode1 -s stop
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode3 -s stop
\ No newline at end of file
tests/script/unique/mnode/mgmt34.sim
浏览文件 @
def56681
...
...
@@ -16,34 +16,34 @@ system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode4 -c numOfMPeers -v 3
print ============== step1
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sleep 3000
sql connect
sql show mnodes
print 192.168.0.1 ==> $data3_1
92.168.0.1
print 192.168.0.2 ==> $data3_
192.168.0.
2
print 192.168.0.3 ==> $data3_
192.168.0.
3
if $data3_1
92.168.0.1
!= master then
print 192.168.0.1 ==> $data3_1
print 192.168.0.2 ==> $data3_2
print 192.168.0.3 ==> $data3_3
if $data3_1 != master then
return -1
endi
if $data3_
192.168.0.
2 != null then
if $data3_2 != null then
return -1
endi
if $data3_
192.168.0.
3 != null then
if $data3_3 != null then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -63,15 +63,15 @@ if $dnode4Role != null then
endi
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sql create dnode 192.168.0.3
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -92,15 +92,15 @@ endi
print ============== step4
system sh/exec.sh -n dnode4 -s start
system sh/exec
_up
.sh -n dnode4 -s start
sql create dnode 192.168.0.4
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -124,10 +124,10 @@ sql drop dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -146,23 +146,23 @@ if $dnode4Role != slave then
return -1
endi
system sh/exec.sh -n dnode2 -s stop
system sh/exec
_up
.sh -n dnode2 -s stop
sleep 3000
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.3
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
print ============== step6
sql create dnode 192.168.0.2
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -182,14 +182,14 @@ if $dnode4Role != slave then
endi
print ============== step7
system sh/exec.sh -n dnode1 -s stop
system sh/exec
_up
.sh -n dnode1 -s stop
sleep 10000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -204,10 +204,10 @@ sql drop dnode 192.168.0.1
sleep 8000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode4Role = $data3_
192.168.0.
4
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
$dnode4Role = $data3_4
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -226,7 +226,7 @@ endi
# return -1
#endi
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec.sh -n dnode4 -s stop
\ No newline at end of file
system sh/exec_up.sh -n dnode1 -s stop
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode3 -s stop
system sh/exec_up.sh -n dnode4 -s stop
\ No newline at end of file
tests/script/unique/mnode/mgmtr1.sim
已删除
100644 → 0
浏览文件 @
be8ea454
system sh/stop_dnodes.sh
system sh/ip.sh -i 1 -s up
system sh/ip.sh -i 2 -s up
system sh/ip.sh -i 3 -s up
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/deploy.sh -n dnode3 -m 192.168.0.1 -i 192.168.0.3
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.3
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.3
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.3
print ============== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 3000
sql show mnodes
$dnode1Role = $data3_192.168.0.1
$dnode2Role = $data3_192.168.0.2
$dnode3Role = $data3_192.168.0.3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
if $dnode1Role != master then
return -1
endi
if $dnode2Role != null then
return -1
endi
if $dnode3Role != null then
return -1
endi
print ============== step2
sql create dnode 192.168.0.2
system sh/exec.sh -n dnode2 -s start
sleep 1000
sql create dnode 192.168.0.3
system sh/exec.sh -n dnode3 -s start
print ============== step3
system sh/exec.sh -n dnode1 -s start
$x = 0
show3:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != master then
goto show3
endi
if $data3_192.168.0.2 != slave then
goto show3
endi
sleep 1000
system sh/exec.sh -n dnode1 -s stop
print ============== step4
print ========= start wait dnode2 is master
$x = 0
show4:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.2 != master then
goto show4
endi
print ============== step5
print ========= start wait dnode1 is offline
step5:
sql show dnodes
$dnode1Status = $data4_192.168.0.1
$dnode2Status = $data4_192.168.0.2
$dnode3Status = $data4_192.168.0.3
print 192.168.0.1 ==> $dnode1Status
print 192.168.0.2 ==> $dnode2Status
print 192.168.0.3 ==> $dnode3Status
if $dnode1Status != offline then
sleep 2000
goto step5
endi
tests/script/unique/mnode/mgmtr2.sim
浏览文件 @
def56681
...
...
@@ -17,14 +17,14 @@ system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.3
system sh/cfg.sh -n dnode3 -c secondIp -v 192.168.0.3
print ============== step1
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sleep 3000
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
@@ -47,29 +47,29 @@ sql create dnode 192.168.0.3
print ============== step3
print ========= start dnode2 and dnode3
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sleep 1000
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sleep 8000
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec
_up
.sh -n dnode2 -s stop
system sh/exec
_up
.sh -n dnode3 -s stop
sleep 4000
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sleep 4000
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec
_up
.sh -n dnode2 -s stop
system sh/exec
_up
.sh -n dnode3 -s stop
sleep 4000
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode3 -s start
print ============== step4
sql show mnodes
$dnode1Role = $data3_1
92.168.0.1
$dnode2Role = $data3_
192.168.0.
2
$dnode3Role = $data3_
192.168.0.
3
$dnode1Role = $data3_1
$dnode2Role = $data3_2
$dnode3Role = $data3_3
print 192.168.0.1 ==> $dnode1Role
print 192.168.0.2 ==> $dnode2Role
print 192.168.0.3 ==> $dnode3Role
...
...
tests/script/unique/mnode/reuse.sim
已删除
100644 → 0
浏览文件 @
be8ea454
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.2
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.2
print ========== step1 dnode1 start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ========== step2 connect to dnode1
sql create dnode 192.168.0.2
system sh/exec.sh -n dnode2 -s start
sleep 3000
print ========== step3
sql show dnodes
print 192.168.0.1 freeVnodes $data3_192.168.0.1
print 192.168.0.2 freeVnodes $data3_192.168.0.2
if $rows != 2 then
return -1
endi
if $data3_192.168.0.1 != 4 then
return -1
endi
if $data3_192.168.0.2 != 4 then
return -1
endi
print ========== step4
system sh/exec.sh -n dnode1 -s stop
sleep 3000
$x = 0
step4:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.2 != master then
goto step4
endi
sql drop dnode 192.168.0.1
print ========== step5
sleep 5000
$x = 0
step5:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show dnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != null then
goto step5
endi
print ========== step6
sql create dnode 192.168.0.1
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.2
system sh/exec.sh -n dnode1 -s start
$x = 0
step6:
$x = $x + 1
sleep 2000
if $x == 5 then
return -1
endi
sql show dnodes
print 192.168.0.1 ==> $data4_192.168.0.1
print 192.168.0.2 ==> $data4_192.168.0.2
if $data4_192.168.0.2 != ready then
goto step6
endi
tests/script/unique/mnode/secondIp.sim
浏览文件 @
def56681
...
...
@@ -7,27 +7,34 @@ system sh/cfg.sh -n dnode1 -c secondIp -v 192.168.0.1
system sh/cfg.sh -n dnode2 -c secondIp -v 192.168.0.1
print ========== step1 dnode2 start
system sh/exec.sh -n dnode2 -s start
sleep 3000
system sh/exec_up.sh -n dnode2 -s start
sql connect
print ========== step2 connect to dnode2
sql create dnode 192.168.0.1
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sleep 3000
print ========== step3
sql show dnodes
print 192.168.0.1 freeVnodes $data3_192.168.0.1
print 192.168.0.2 freeVnodes $data3_192.168.0.2
print 192.168.0.1 openvnodes $data3_1
print 192.168.0.2 openvnodes $data3_2
print 192.168.0.1 totalvnodes $data4_1
print 192.168.0.2 totalvnodes $data4_2
if $rows != 2 then
return -1
endi
if $data3_192.168.0.1 != 4 then
if $data3_1 != 0 then
return -1
endi
if $data3_2 != 0 then
return -1
endi
if $data4_1 != 4 then
return -1
endi
if $data
3_192.168.0.
2 != 4 then
if $data
4_
2 != 4 then
return -1
endi
...
...
tests/script/unique/mnode/tcp_mgmt22.sim
已删除
100644 → 0
浏览文件 @
be8ea454
system sh/stop_dnodes.sh
system sh/ip.sh -i 1 -s up
system sh/ip.sh -i 2 -s up
system sh/ip.sh -i 3 -s up
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/deploy.sh -n dnode3 -m 192.168.0.1 -i 192.168.0.3
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 2
system sh/cfg.sh -n dnode1 -c sockettype -v tcp
system sh/cfg.sh -n dnode2 -c sockettype -v tcp
system sh/cfg.sh -n dnode3 -c sockettype -v tcp
print ============== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 3000
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != master then
return -1
endi
print ============== step2
system sh/exec.sh -n dnode2 -s start
sql create dnode 192.168.0.2
$x = 0
show2:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != master then
goto show2
endi
if $data3_192.168.0.2 != slave then
goto show2
endi
return
print ============== step3
sql drop dnode 192.168.0.1 -x error1
print should not drop master
return -1
error1:
print ============== step4
system sh/exec.sh -n dnode1 -s stop
sleep 8000
$x = 0
show4:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != undecided then
goto show4
endi
if $data3_192.168.0.2 != master then
goto show4
endi
print ============== step5
sql drop dnode 192.168.0.1
sleep 8000
$x = 0
show5:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != null then
goto show5
endi
if $data3_192.168.0.2 != master then
goto show5
endi
print ============== step6
#system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
#system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2
system sh/exec.sh -n dnode1 -s start
sql create dnode 192.168.0.1
sleep 5000
$x = 0
show6:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
if $data3_192.168.0.1 != slave then
goto show6
endi
if $data3_192.168.0.2 != master then
goto show6
endi
print ============== step7
system sh/exec.sh -n dnode3 -s start
sql create dnode 192.168.0.3
sleep 5000
$x = 0
show7:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show mnodes
print 192.168.0.1 ==> $data3_192.168.0.1
print 192.168.0.2 ==> $data3_192.168.0.2
print 192.168.0.3 ==> $data3_192.168.0.3
if $data3_192.168.0.1 != slave then
goto show7
endi
if $data3_192.168.0.2 != master then
goto show7
endi
if $data3_192.168.0.3 != null then
goto show7
endi
tests/script/unique/mnode/testSuite.sim
浏览文件 @
def56681
...
...
@@ -5,9 +5,6 @@ run unique/mnode/mgmt25.sim
run unique/mnode/mgmt26.sim
run unique/mnode/mgmt33.sim
run unique/mnode/mgmt34.sim
run unique/mnode/mgmtr1.sim
run unique/mnode/mgmtr2.sim
run unique/mnode/drop.sim
run unique/mnode/reuse.sim
run unique/mnode/secondIp.sim
tests/script/unique/testSuite.sim
浏览文件 @
def56681
#################################
run unique/account/basic.sim
run unique/account/paras.sim
run unique/account/usage.sim
run unique/mnode/testSuite.sim
##################################
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录