Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
66b6a77d
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
66b6a77d
编写于
1月 06, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2352]<test> trans data test for cluster
上级
42e34d53
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
328 addition
and
0 deletion
+328
-0
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+5
-0
tests/script/jenkins/basic_3.txt
tests/script/jenkins/basic_3.txt
+4
-0
tests/script/sh/move_dnode.sh
tests/script/sh/move_dnode.sh
+47
-0
tests/script/sh/mv_old_data.sh
tests/script/sh/mv_old_data.sh
+37
-0
tests/script/unique/dnode/datatrans_1node.sim
tests/script/unique/dnode/datatrans_1node.sim
+53
-0
tests/script/unique/dnode/datatrans_3node.sim
tests/script/unique/dnode/datatrans_3node.sim
+91
-0
tests/script/unique/dnode/datatrans_3node_2.sim
tests/script/unique/dnode/datatrans_3node_2.sim
+91
-0
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
66b6a77d
...
...
@@ -385,3 +385,8 @@ cd ../../../debug; make
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
./test.sh -f unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
./test.sh -f general/connection/test_old_data.sim
./test.sh -f unique/dnode/datatrans_3node.sim
./test.sh -f unique/dnode/datatrans_3node_2.sim
tests/script/jenkins/basic_3.txt
浏览文件 @
66b6a77d
...
...
@@ -73,3 +73,7 @@
./test.sh -f general/stream/stream_restart.sim
./test.sh -f general/stream/table_del.sim
./test.sh -f general/stream/table_replica1_vnoden.sim
./test.sh -f general/connection/test_old_data.sim
./test.sh -f unique/dnode/datatrans_3node.sim
./test.sh -f unique/dnode/datatrans_3node_2.sim
\ No newline at end of file
tests/script/sh/move_dnode.sh
0 → 100755
浏览文件 @
66b6a77d
#!/bin/bash
echo
"Executing move_dnode.sh"
SCRIPT_DIR
=
`
dirname
$0
`
cd
$SCRIPT_DIR
/../
SCRIPT_DIR
=
`
pwd
`
echo
"SCRIPT_DIR:
$SCRIPT_DIR
"
IN_TDINTERNAL
=
"community"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
TAOSD_DIR
=
`
find
.
-name
"taosd"
|grep bin|head
-n1
`
if
[[
"
$TAOSD_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|head
-n1
|cut
-d
'/'
--fields
=
2,3
`
else
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|head
-n1
|cut
-d
'/'
--fields
=
2
`
fi
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
/build
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
if
[
-d
"
$SIM_DIR
/
$2
"
]
;
then
rm
-rf
$SIM_DIR
/
$2
fi
mv
$SIM_DIR
/
$1
$SIM_DIR
/
$2
if
[[
$2
=
~
"dnode2"
]]
;
then
sed
-i
's/serverPort 7100/serverPort 7200/g'
$SIM_DIR
/
$2
/cfg/taos.cfg
sed
-i
's/dnode1/dnode2/g'
$SIM_DIR
/
$2
/cfg/taos.cfg
sed
-i
's/7100/7200/g'
$SIM_DIR
/
$2
/data/dnode/dnodeEps.json
elif
[[
$2
=
~
"dnode4"
]]
;
then
sed
-i
's/serverPort 7100/serverPort 7400/g'
$SIM_DIR
/
$2
/cfg/taos.cfg
sed
-i
's/dnode1/dnode4/g'
$SIM_DIR
/
$2
/cfg/taos.cfg
sed
-i
's/7100/7400/g'
$SIM_DIR
/dnode2/data/dnode/dnodeEps.json
sed
-i
's/7100/7400/g'
$SIM_DIR
/dnode3/data/dnode/dnodeEps.json
sed
-i
's/7100/7400/g'
$SIM_DIR
/
$2
/data/dnode/dnodeEps.json
fi
tests/script/sh/mv_old_data.sh
0 → 100755
浏览文件 @
66b6a77d
#!/bin/bash
echo
"Executing mv_old_data.sh"
SCRIPT_DIR
=
`
dirname
$0
`
cd
$SCRIPT_DIR
/../
SCRIPT_DIR
=
`
pwd
`
echo
"SCRIPT_DIR:
$SCRIPT_DIR
"
IN_TDINTERNAL
=
"community"
if
[[
"
$SCRIPT_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
cd
../../..
else
cd
../../
fi
TAOS_DIR
=
`
pwd
`
TAOSD_DIR
=
`
find
.
-name
"taosd"
|grep bin|head
-n1
`
if
[[
"
$TAOSD_DIR
"
==
*
"
$IN_TDINTERNAL
"
*
]]
;
then
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|head
-n1
|cut
-d
'/'
--fields
=
2,3
`
else
BIN_DIR
=
`
find
.
-name
"taosd"
|grep bin|head
-n1
|cut
-d
'/'
--fields
=
2
`
fi
BUILD_DIR
=
$TAOS_DIR
/
$BIN_DIR
/build
SIM_DIR
=
$TAOS_DIR
/sim
NODE_DIR
=
$SIM_DIR
/
$NODE_NAME
rm
-rf
$SIM_DIR
/dnode1
rm
-rf
$SIM_DIR
/dnode2
rm
-rf
$SIM_DIR
/dnode3
rm
-rf
$SIM_DIR
/tsim
tar
zxf
$SCRIPT_DIR
/general/connection/sim.tar.gz
-C
$SIM_DIR
/../
tests/script/unique/dnode/datatrans_1node.sim
0 → 100644
浏览文件 @
66b6a77d
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print =============== step1
sql drop database -x step1
step1:
sql create database db
sql use db
sql create table m1 (ts timestamp, speed int)
print =============== step 2
$x = 0
while $x < 10
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into m1 values ($ms , $x )
$x = $x + 1
endw
sql select * from m1
print $rows points data are retrieved
if $rows != 10 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== step 3
system sh/move_dnode.sh dnode1 dnode2
system sh/exec.sh -n dnode2 -s start
print =============== step 4
sleep 3000
sql connect
sql select * from db.m1
print $rows points data are retrieved
if $rows != 10 then
return -1
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/dnode/datatrans_3node.sim
0 → 100644
浏览文件 @
66b6a77d
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
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/cfg.sh -n dnode2 -c walLevel -v 2
system sh/cfg.sh -n dnode3 -c walLevel -v 2
system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c role -v 2
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
print ============== step1: start dnode1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ============== step2: start dnode2/dnode3 and add into cluster , then create database with replica 2, and create table, insert data
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname2
sql create dnode $hostname3
sleep 3000
# create table
sql drop database -x step1
step1:
sql create database db
sql use db
sql create table m1 (ts timestamp, speed int)
# insert data
$x = 0
while $x < 10
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into m1 values ($ms , $x )
$x = $x + 1
endw
sql select * from m1
print $rows points data are retrieved
if $rows != 10 then
return -1
endi
print ============== step3: stop cluster , then move_dnode1 ,start cluster
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/move_dnode.sh dnode1 dnode4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
print =============== step 4
sleep 3000
sql connect
sql select * from db.m1
print $rows points data are retrieved
if $rows != 10 then
return -1
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/dnode/datatrans_3node_2.sim
0 → 100644
浏览文件 @
66b6a77d
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
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/cfg.sh -n dnode2 -c walLevel -v 2
system sh/cfg.sh -n dnode3 -c walLevel -v 2
system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c role -v 2
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
print ============== step1: start dnode1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ============== step2: start dnode2/dnode3 and add into cluster , then create database with replica 2, and create table, insert data
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname2
sql create dnode $hostname3
sleep 3000
# create table
sql drop database -x step1
step1:
sql create database db replica 2
sql use db
sql create table m1 (ts timestamp, speed int)
# insert data
$x = 0
while $x < 10
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into m1 values ($ms , $x )
$x = $x + 1
endw
sql select * from m1
print $rows points data are retrieved
if $rows != 10 then
return -1
endi
print ============== step3: stop cluster , then move_dnode1 ,start cluster
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/move_dnode.sh dnode1 dnode4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
print =============== step 4
sleep 3000
sql connect
sql select * from db.m1
print $rows points data are retrieved
if $rows != 10 then
return -1
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录