Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0ba9d225
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0ba9d225
编写于
7月 13, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: restore some 2.0 case
上级
2ea11ba9
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
94 addition
and
143 deletion
+94
-143
tests/script/general/compute/testSuite.sim
tests/script/general/compute/testSuite.sim
+0
-17
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+20
-0
tests/script/tsim/compute/avg.sim
tests/script/tsim/compute/avg.sim
+1
-4
tests/script/tsim/compute/block_dist.sim
tests/script/tsim/compute/block_dist.sim
+1
-4
tests/script/tsim/compute/bottom.sim
tests/script/tsim/compute/bottom.sim
+1
-4
tests/script/tsim/compute/count.sim
tests/script/tsim/compute/count.sim
+1
-4
tests/script/tsim/compute/diff.sim
tests/script/tsim/compute/diff.sim
+1
-4
tests/script/tsim/compute/diff2.sim
tests/script/tsim/compute/diff2.sim
+1
-4
tests/script/tsim/compute/first.sim
tests/script/tsim/compute/first.sim
+1
-4
tests/script/tsim/compute/interval.sim
tests/script/tsim/compute/interval.sim
+1
-4
tests/script/tsim/compute/last.sim
tests/script/tsim/compute/last.sim
+1
-4
tests/script/tsim/compute/last_row.sim
tests/script/tsim/compute/last_row.sim
+1
-4
tests/script/tsim/compute/leastsquare.sim
tests/script/tsim/compute/leastsquare.sim
+1
-4
tests/script/tsim/compute/max.sim
tests/script/tsim/compute/max.sim
+1
-4
tests/script/tsim/compute/min.sim
tests/script/tsim/compute/min.sim
+14
-18
tests/script/tsim/compute/null.sim
tests/script/tsim/compute/null.sim
+12
-11
tests/script/tsim/compute/percentile.sim
tests/script/tsim/compute/percentile.sim
+1
-5
tests/script/tsim/compute/stddev.sim
tests/script/tsim/compute/stddev.sim
+7
-10
tests/script/tsim/compute/sum.sim
tests/script/tsim/compute/sum.sim
+15
-18
tests/script/tsim/compute/top.sim
tests/script/tsim/compute/top.sim
+13
-16
未找到文件。
tests/script/general/compute/testSuite.sim
已删除
100644 → 0
浏览文件 @
2ea11ba9
run general/compute/avg.sim
run general/compute/bottom.sim
run general/compute/count.sim
run general/compute/diff.sim
run general/compute/diff2.sim
run general/compute/first.sim
run general/compute/interval.sim
run general/compute/last.sim
run general/compute/leastsquare.sim
run general/compute/max.sim
run general/compute/min.sim
run general/compute/null.sim
run general/compute/percentile.sim
run general/compute/stddev.sim
run general/compute/sum.sim
run general/compute/top.sim
run general/compute/block_dist.sim
tests/script/jenkins/basic.txt
浏览文件 @
0ba9d225
...
@@ -225,6 +225,26 @@
...
@@ -225,6 +225,26 @@
./test.sh -f tsim/compress/compress.sim
./test.sh -f tsim/compress/compress.sim
./test.sh -f tsim/compress/uncompress.sim
./test.sh -f tsim/compress/uncompress.sim
# ---- compute
#./test.sh -f tsim/compute/avg.sim
#./test.sh -f tsim/compute/block_dist.sim
#./test.sh -f tsim/compute/bottom.sim
#./test.sh -f tsim/compute/count.sim
#./test.sh -f tsim/compute/diff.sim
#./test.sh -f tsim/compute/diff2.sim
#./test.sh -f tsim/compute/first.sim
#./test.sh -f tsim/compute/interval.sim
#./test.sh -f tsim/compute/last_row.sim
#./test.sh -f tsim/compute/last.sim
#./test.sh -f tsim/compute/leastsquare.sim
#./test.sh -f tsim/compute/max.sim
#./test.sh -f tsim/compute/min.sim
#./test.sh -f tsim/compute/null.sim
./test.sh -f tsim/compute/percentile.sim
./test.sh -f tsim/compute/stddev.sim
./test.sh -f tsim/compute/sum.sim
./test.sh -f tsim/compute/top.sim
# ---- field
# ---- field
./test.sh -f tsim/field/2.sim
./test.sh -f tsim/field/2.sim
./test.sh -f tsim/field/3.sim
./test.sh -f tsim/field/3.sim
...
...
tests/script/
general
/compute/avg.sim
→
tests/script/
tsim
/compute/avg.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_av_db
$dbPrefix = m_av_db
...
@@ -163,7 +160,7 @@ endi
...
@@ -163,7 +160,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/block_dist.sim
→
tests/script/
tsim
/compute/block_dist.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_di_db
$dbPrefix = m_di_db
...
@@ -91,7 +88,7 @@ sql_error select _block_dist() from (select * from $mt)
...
@@ -91,7 +88,7 @@ sql_error select _block_dist() from (select * from $mt)
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/bottom.sim
→
tests/script/
tsim
/compute/bottom.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_bo_db
$dbPrefix = m_bo_db
...
@@ -98,7 +95,7 @@ step6:
...
@@ -98,7 +95,7 @@ step6:
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/count.sim
→
tests/script/
tsim
/compute/count.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_co_db
$dbPrefix = m_co_db
...
@@ -192,7 +189,7 @@ endi
...
@@ -192,7 +189,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/diff.sim
→
tests/script/
tsim
/compute/diff.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_di_db
$dbPrefix = m_di_db
...
@@ -91,7 +88,7 @@ step6:
...
@@ -91,7 +88,7 @@ step6:
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/diff2.sim
→
tests/script/
tsim
/compute/diff2.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_di_db
$dbPrefix = m_di_db
...
@@ -152,7 +149,7 @@ step6:
...
@@ -152,7 +149,7 @@ step6:
print =============== clear
print =============== clear
#sql drop database $db
#sql drop database $db
#sql show databases
#sql show databases
#if $rows !=
0
then
#if $rows !=
2
then
# return -1
# return -1
#endi
#endi
...
...
tests/script/
general
/compute/first.sim
→
tests/script/
tsim
/compute/first.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_fi_db
$dbPrefix = m_fi_db
...
@@ -165,7 +162,7 @@ endi
...
@@ -165,7 +162,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/interval.sim
→
tests/script/
tsim
/compute/interval.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_in_db
$dbPrefix = m_in_db
...
@@ -199,7 +196,7 @@ endi
...
@@ -199,7 +196,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/last.sim
→
tests/script/
tsim
/compute/last.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_la_db
$dbPrefix = m_la_db
...
@@ -169,7 +166,7 @@ endi
...
@@ -169,7 +166,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/last_row.sim
→
tests/script/
tsim
/compute/last_row.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_la_db
$dbPrefix = m_la_db
...
@@ -217,7 +214,7 @@ endi
...
@@ -217,7 +214,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/leastsquare.sim
→
tests/script/
tsim
/compute/leastsquare.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_le_db
$dbPrefix = m_le_db
...
@@ -93,7 +90,7 @@ endi
...
@@ -93,7 +90,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/max.sim
→
tests/script/
tsim
/compute/max.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_ma_db
$dbPrefix = m_ma_db
...
@@ -169,7 +166,7 @@ endi
...
@@ -169,7 +166,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/min.sim
→
tests/script/
tsim
/compute/min.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_mi_db
$dbPrefix = m_mi_db
...
@@ -73,14 +69,14 @@ endi
...
@@ -73,14 +69,14 @@ endi
print =============== step5
print =============== step5
sql select min(tbcol) as b from $tb interval(1m)
sql select min(tbcol) as b from $tb interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select min(tbcol) as b from $tb interval(1d)
sql select min(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
...
@@ -90,8 +86,8 @@ $ms = 1601481600000 + $cc
...
@@ -90,8 +86,8 @@ $ms = 1601481600000 + $cc
sql select min(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select min(tbcol) as b from $tb where ts <= $ms interval(1m)
print select min(tbcol) as b from $tb where ts <= $ms interval(1m)
print select min(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -130,14 +126,14 @@ endi
...
@@ -130,14 +126,14 @@ endi
print =============== step9
print =============== step9
sql select min(tbcol) as b from $mt interval(1m)
sql select min(tbcol) as b from $mt interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select min(tbcol) as b from $mt interval(1d)
sql select min(tbcol) as b from $mt interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0 then
if $data0
0
!= 0 then
return -1
return -1
endi
endi
...
@@ -155,9 +151,9 @@ endi
...
@@ -155,9 +151,9 @@ endi
print =============== step11
print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select min(tbcol) as b from $mt where ts <= $ms
interval(1m) group by tgcol
sql select min(tbcol) as b from $mt where ts <= $ms
partition by tgcol interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
print ===> $rows
print ===> $rows
...
@@ -168,7 +164,7 @@ endi
...
@@ -168,7 +164,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/null.sim
→
tests/script/
tsim
/compute/null.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = db
$dbPrefix = db
...
@@ -98,22 +95,26 @@ if $data02 != 19 then
...
@@ -98,22 +95,26 @@ if $data02 != 19 then
return -1
return -1
endi
endi
sql select * from $tb where tbcol = NULL -x step3
sql select * from $tb where tbcol is NULL
if $rows != 1 then
return -1
return -1
step3:
endi
sql_error select * from $tb where tbcol = NULL
return
print =============== step5
print =============== step5
sql create table $tb using $mt tags( NULL )
sql create table tt using $mt tags( NULL )
# return -1
#step51:
#sql alter table $tb set tgcol=NULL -x step52
#sql alter table $tb set tgcol=NULL -x step52
# return -1
# return -1
#step52:
#step52:
sql select * from $mt where tgcol = NULL -x step5
sql select * from $mt where tgcol is NULL
if $rows != 1 then
return -1
return -1
step5:
endi
print =============== step6
print =============== step6
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $mt
sql select count(tbcol), count(tbcol2), avg(tbcol), avg(tbcol2), sum(tbcol), sum(tbcol2) from $mt
...
@@ -222,7 +223,7 @@ endi
...
@@ -222,7 +223,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/percentile.sim
→
tests/script/
tsim
/compute/percentile.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_pe_db
$dbPrefix = m_pe_db
...
@@ -125,11 +122,10 @@ if $data00 != 5.000000000 then
...
@@ -125,11 +122,10 @@ if $data00 != 5.000000000 then
return -1
return -1
endi
endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/stddev.sim
→
tests/script/
tsim
/compute/stddev.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_st_db
$dbPrefix = m_st_db
...
@@ -72,14 +69,14 @@ endi
...
@@ -72,14 +69,14 @@ endi
print =============== step5
print =============== step5
sql select stddev(tbcol) as b from $tb interval(1m)
sql select stddev(tbcol) as b from $tb interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0.000000000 then
if $data0
0
!= 0.000000000 then
return -1
return -1
endi
endi
sql select stddev(tbcol) as b from $tb interval(1d)
sql select stddev(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 5.766281297 then
if $data0
0
!= 5.766281297 then
return -1
return -1
endi
endi
...
@@ -88,8 +85,8 @@ $cc = 4 * 60000
...
@@ -88,8 +85,8 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select stddev(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select stddev(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 0.000000000 then
if $data0
0
!= 0.000000000 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -99,7 +96,7 @@ endi
...
@@ -99,7 +96,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/sum.sim
→
tests/script/
tsim
/compute/sum.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_su_db
$dbPrefix = m_su_db
...
@@ -72,14 +69,14 @@ endi
...
@@ -72,14 +69,14 @@ endi
print =============== step5
print =============== step5
sql select sum(tbcol) as b from $tb interval(1m)
sql select sum(tbcol) as b from $tb interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
sql select sum(tbcol) as b from $tb interval(1d)
sql select sum(tbcol) as b from $tb interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 190 then
if $data0
0
!= 190 then
return -1
return -1
endi
endi
...
@@ -88,8 +85,8 @@ $cc = 4 * 60000
...
@@ -88,8 +85,8 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select sum(tbcol) as b from $tb where ts <= $ms interval(1m)
sql select sum(tbcol) as b from $tb where ts <= $ms interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
!= 1 then
if $data1
0
!= 1 then
return -1
return -1
endi
endi
if $rows != 5 then
if $rows != 5 then
...
@@ -130,14 +127,14 @@ endi
...
@@ -130,14 +127,14 @@ endi
print =============== step9
print =============== step9
sql select sum(tbcol) as b from $mt interval(1m)
sql select sum(tbcol) as b from $mt interval(1m)
print ===> $data1
1
print ===> $data1
0
if $data1
1
< 5 then
if $data1
0
< 5 then
return -1
return -1
endi
endi
sql select sum(tbcol) as b from $mt interval(1d)
sql select sum(tbcol) as b from $mt interval(1d)
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 1900 then
if $data0
0
!= 1900 then
return -1
return -1
endi
endi
...
@@ -156,10 +153,10 @@ print =============== step11
...
@@ -156,10 +153,10 @@ print =============== step11
$cc = 4 * 60000
$cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select sum(tbcol) as b from $mt where ts <= $ms
interval(1d)
group by tgcol
sql select sum(tbcol) as b from $mt where ts <= $ms group by tgcol
print select sum(tbcol) as b from $mt where ts <= $ms
interval(1d)
group by tgcol
print select sum(tbcol) as b from $mt where ts <= $ms group by tgcol
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 10 then
if $data0
0
!= 10 then
return -1
return -1
endi
endi
if $rows != 10 then
if $rows != 10 then
...
@@ -169,7 +166,7 @@ endi
...
@@ -169,7 +166,7 @@ endi
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
tests/script/
general
/compute/top.sim
→
tests/script/
tsim
/compute/top.sim
浏览文件 @
0ba9d225
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
sql connect
$dbPrefix = m_to_db
$dbPrefix = m_to_db
...
@@ -48,8 +45,8 @@ $i = 1
...
@@ -48,8 +45,8 @@ $i = 1
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
sql select top(tbcol, 1) from $tb
sql select top(tbcol, 1) from $tb
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 19 then
if $data0
0
!= 19 then
return -1
return -1
endi
endi
...
@@ -58,25 +55,25 @@ $cc = 4 * 60000
...
@@ -58,25 +55,25 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select top(tbcol, 1) from $tb where ts <= $ms
sql select top(tbcol, 1) from $tb where ts <= $ms
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 4 then
if $data0
0
!= 4 then
return -1
return -1
endi
endi
print =============== step4
print =============== step4
sql select top(tbcol, 1) as b from $tb
sql select top(tbcol, 1) as b from $tb
print ===> $data0
1
print ===> $data0
0
if $data0
1
!= 19 then
if $data0
0
!= 19 then
return -1
return -1
endi
endi
print =============== step5
print =============== step5
sql select top(tbcol, 2) as b from $tb
sql select top(tbcol, 2) as b from $tb
print ===> $data0
1 $data11
print ===> $data0
0 $data10
if $data0
1
!= 18 then
if $data0
0
!= 18 then
return -1
return -1
endi
endi
if $data1
1
!= 19 then
if $data1
0
!= 19 then
return -1
return -1
endi
endi
...
@@ -85,11 +82,11 @@ $cc = 4 * 60000
...
@@ -85,11 +82,11 @@ $cc = 4 * 60000
$ms = 1601481600000 + $cc
$ms = 1601481600000 + $cc
sql select top(tbcol, 2) as b from $tb where ts <= $ms
sql select top(tbcol, 2) as b from $tb where ts <= $ms
print ===> $data0
1 $data11
print ===> $data0
0 $data10
if $data0
1
!= 3 then
if $data0
0
!= 3 then
return -1
return -1
endi
endi
if $data1
1
!= 4 then
if $data1
0
!= 4 then
return -1
return -1
endi
endi
...
@@ -100,7 +97,7 @@ step6:
...
@@ -100,7 +97,7 @@ step6:
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
return -1
endi
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录