提交 de9a4bb9 编写于 作者: S Shengliang Guan

scripts

上级 5123d296
......@@ -29,8 +29,8 @@ while $x < 1010
$x = $x + 1
endw
sql_error create database d1 replica 2 wal 0
sql create database d2 replica 1 wal 0
sql_error create database d1 replica 2 wallevel 0
sql_error create database d2 replica 1 wallevel 0
sql_error alter database d2 replica 2
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......
......@@ -148,25 +148,10 @@ print ========= step5
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql select * from d1.t1
if $rows != 2 then
return -1
endi
sql select * from d2.t2
if $rows != 2 then
return -1
endi
sql select * from d3.t3
if $rows != 2 then
return -1
endi
sql select * from d4.t4
if $rows != 2 then
return -1
endi
sql_error select * from d1.t1
sql_error select * from d2.t2
sql_error select * from d3.t3
sql_error select * from d4.t4
print ===== insert data
......@@ -175,26 +160,6 @@ 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 != 2 then
return -1
endi
sql select * from d2.t2
if $rows != 2 then
return -1
endi
sql select * from d3.t3
if $rows != 2 then
return -1
endi
sql select * from d4.t4
if $rows != 2 then
return -1
endi
print ========= step6
system sh/exec.sh -n dnode2 -s start
sleep 5000
......@@ -234,25 +199,10 @@ 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 != 3 then
return -1
endi
sql select * from d3.t3
if $rows != 3 then
return -1
endi
sql select * from d4.t4
if $rows != 3 then
return -1
endi
sql_error select * from d1.t1
sql_error select * from d2.t2
sql_error select * from d3.t3
sql_error select * from d4.t4
print ========= step7
system sh/exec.sh -n dnode3 -s start
......
......@@ -102,19 +102,15 @@ print ========= step4
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(now, 3) -x step1
step1:
sql insert into d2.t2 values(now, 3) -x step2
step2:
sql insert into d3.t3 values(now, 3) -x step3
step3:
sql insert into d4.t4 values(now, 3) -x step4
step4:
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
sql select * from d2.t2
sql select * from d3.t3
sql select * from d4.t4
sql_error select * from d1.t1
sql_error select * from d2.t2
sql_error select * from d3.t3
sql_error select * from d4.t4
print ========= step5
system sh/exec.sh -n dnode2 -s start
......@@ -126,14 +122,10 @@ sleep 5000
sql reset query cache
sleep 1000
sql insert into d1.t1 values(now, 3) -x step11
step11:
sql insert into d2.t2 values(now, 3) -x step21
step21:
sql insert into d3.t3 values(now, 3) -x step31
step31:
sql insert into d4.t4 values(now, 3) -x step41
step41:
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)
print ========= step6
system sh/exec.sh -n dnode3 -s start
......
......@@ -125,7 +125,7 @@ endi
system_content curl -u root:taosdata -d '[{"metric": "sys_cpu","timestamp": 1346846400,"value": 18,"tags": {"host": "web01","group1": "1","group1": "1","group1": "1","group1": "1","group1": "1","dc": "lga"}}]' 127.0.0.1:6020/opentsdb/db/put
print $system_content
if $system_content != @{"errors":[{"datapoint":{"metric":"sys_cpu","stable":"sys_cpu_d_bbbbbbb","table":"sys_cpu_d_bbbbbbb_lga_1_1_1_1_1_web01","timestamp":1346846400,"value":18.000000,"tags":{"dc":"lga","group1":"1","group1":"1","group1":"1","group1":"1","group1":"1","host":"web01"},"status":"error","code":-2147483135}}],"failed":1,"success":0,"affected_rows":0}@ then
if $system_content != @{"errors":[{"datapoint":{"metric":"sys_cpu","stable":"sys_cpu_d_bbbbbbb","table":"sys_cpu_d_bbbbbbb_lga_1_1_1_1_1_web01","timestamp":1346846400,"value":18.000000,"tags":{"dc":"lga","group1":"1","group1":"1","group1":"1","group1":"1","group1":"1","host":"web01"},"status":"error","code":-2147482782}}],"failed":1,"success":0,"affected_rows":0}@ then
return -1
endi
......
......@@ -74,6 +74,7 @@ endi
sleep 100
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
print =============== step2
sql select count(*) from $mt -x step2
......@@ -85,7 +86,7 @@ sql select count(tbcol) from $mt -x step21
step21:
system sh/exec.sh -n dnode2 -s start
sleep 10000
sleep 5000
print =============== step3
sql select count(tbcol) as c from $mt where ts <= 1519833840000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册