Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c93cb979
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看板
提交
c93cb979
编写于
9月 19, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
other:merge 3.0
上级
78f03e99
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
18 addition
and
63 deletion
+18
-63
tests/script/tsim/parser/union.sim
tests/script/tsim/parser/union.sim
+1
-1
tests/system-test/0-others/taosShellNetChk.py
tests/system-test/0-others/taosShellNetChk.py
+1
-1
tests/system-test/1-insert/mutil_stage.py
tests/system-test/1-insert/mutil_stage.py
+3
-0
tests/system-test/2-query/max.py
tests/system-test/2-query/max.py
+2
-19
tests/system-test/2-query/max_partition.py
tests/system-test/2-query/max_partition.py
+1
-1
tests/system-test/2-query/min.py
tests/system-test/2-query/min.py
+6
-39
tests/system-test/2-query/twa.py
tests/system-test/2-query/twa.py
+1
-1
tests/system-test/7-tmq/tmqDelete-multiCtb.py
tests/system-test/7-tmq/tmqDelete-multiCtb.py
+3
-1
未找到文件。
tests/script/tsim/parser/union.sim
浏览文件 @
c93cb979
...
...
@@ -116,7 +116,7 @@ sql_error (select c1 from union_tb0 limit 1 union all select c1 from union_tb1 l
sql_error (select c1 from union_tb0 limit 1 union all select c1 from union_tb1 limit 1) limit 1
# sql with parenthese
sql (
((select c1 from union_tb0))
)
sql (
select c1 from union_tb0
)
if $rows != 10000 then
return -1
endi
...
...
tests/system-test/0-others/taosShellNetChk.py
浏览文件 @
c93cb979
...
...
@@ -231,7 +231,7 @@ class TDTestCase:
if
platform
.
system
().
lower
()
==
'windows'
:
os
.
system
(
'ps -a | grep taos | awk
\'
{print $2}
\'
| xargs kill -9'
)
else
:
os
.
system
(
'pkill taos'
)
os
.
system
(
'pkill
-9
taos'
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/system-test/1-insert/mutil_stage.py
浏览文件 @
c93cb979
from
datetime
import
datetime
from
platform
import
platform
import
time
from
typing
import
List
,
Any
,
Tuple
...
...
@@ -83,6 +84,8 @@ class TDTestCase:
def
del_old_datadir
(
self
,
filename
):
cmd
=
f
"sed -i '/^dataDir/d'
{
filename
}
"
if
platform
.
system
().
lower
()
==
'darwin'
:
cmd
=
f
"sed -i '' '/^dataDir/d'
{
filename
}
"
if
os
.
system
(
cmd
)
!=
0
:
tdLog
.
exit
(
cmd
)
...
...
tests/system-test/2-query/max.py
浏览文件 @
c93cb979
...
...
@@ -38,18 +38,7 @@ class TDTestCase:
elif
i
>=
9
:
tdSql
.
checkData
(
0
,
0
,
np
.
max
(
floatData
))
tdSql
.
query
(
f
"select max(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select last(ts) from
{
dbname
}
.stb_1"
)
lastTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select max(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
lastTs
)
tdSql
.
query
(
f
"select last(ts) from
{
dbname
}
.stb"
)
lastTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select max(ts) from
{
dbname
}
.stb"
)
tdSql
.
checkData
(
0
,
0
,
lastTs
)
tdSql
.
error
(
f
"select max(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
query
(
f
"select max(col1) from
{
dbname
}
.stb_1 where col2<=5"
)
tdSql
.
checkData
(
0
,
0
,
5
)
...
...
@@ -78,13 +67,7 @@ class TDTestCase:
elif
i
>=
9
:
tdSql
.
checkData
(
0
,
0
,
np
.
max
(
floatData
))
tdSql
.
query
(
f
"select max(now()) from
{
dbname
}
.ntb"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select last(ts) from
{
dbname
}
.ntb"
)
lastTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select max(ts) from
{
dbname
}
.ntb"
)
tdSql
.
checkData
(
0
,
0
,
lastTs
)
tdSql
.
error
(
f
"select max(now()) from
{
dbname
}
.ntb"
)
tdSql
.
query
(
f
"select max(col1) from
{
dbname
}
.ntb where col2<=5"
)
tdSql
.
checkData
(
0
,
0
,
5
)
...
...
tests/system-test/2-query/max_partition.py
浏览文件 @
c93cb979
...
...
@@ -181,7 +181,7 @@ class TDTestCase:
# bug need fix
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
query
(
f
"select c1 , twa(c1) from
{
dbname
}
.s
tb
partition by c1 order by c1"
)
tdSql
.
query
(
f
"select c1 , twa(c1) from
{
dbname
}
.s
ub_stb_1
partition by c1 order by c1"
)
tdSql
.
checkRows
(
11
)
tdSql
.
checkData
(
0
,
1
,
None
)
...
...
tests/system-test/2-query/min.py
浏览文件 @
c93cb979
...
...
@@ -37,6 +37,8 @@ class TDTestCase:
floatData
.
append
(
i
+
0.1
)
# max verifacation
tdSql
.
error
(
f
"select min(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col7) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col8) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col9) from
{
dbname
}
.stb_1"
)
...
...
@@ -67,20 +69,9 @@ class TDTestCase:
tdSql
.
query
(
f
"select min(col1) from
{
dbname
}
.stb_1 where col2>=5"
)
tdSql
.
checkData
(
0
,
0
,
5
)
tdSql
.
query
(
f
"select min(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select first(ts) from
{
dbname
}
.stb_1"
)
firstTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
firstTs
)
tdSql
.
query
(
f
"select first(ts) from
{
dbname
}
.stb_1"
)
firstTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
firstTs
)
tdSql
.
error
(
f
"select min(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col7) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col8) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col9) from
{
dbname
}
.stb_1"
)
...
...
@@ -111,19 +102,8 @@ class TDTestCase:
tdSql
.
query
(
f
"select min(col1) from
{
dbname
}
.stb where col2>=5"
)
tdSql
.
checkData
(
0
,
0
,
5
)
tdSql
.
query
(
f
"select min(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select first(ts) from
{
dbname
}
.stb_1"
)
firstTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
firstTs
)
tdSql
.
query
(
f
"select first(ts) from
{
dbname
}
.stb_1"
)
firstTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
firstTs
)
tdSql
.
error
(
f
"select min(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select min(col7) from
{
dbname
}
.ntb"
)
tdSql
.
error
(
f
"select min(col8) from
{
dbname
}
.ntb"
)
tdSql
.
error
(
f
"select min(col9) from
{
dbname
}
.ntb"
)
...
...
@@ -154,19 +134,6 @@ class TDTestCase:
tdSql
.
query
(
f
"select min(col1) from
{
dbname
}
.ntb where col2>=5"
)
tdSql
.
checkData
(
0
,
0
,
5
)
tdSql
.
query
(
f
"select min(now()) from
{
dbname
}
.stb_1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select first(ts) from
{
dbname
}
.stb_1"
)
firstTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
firstTs
)
tdSql
.
query
(
f
"select first(ts) from
{
dbname
}
.stb_1"
)
firstTs
=
tdSql
.
getData
(
0
,
0
)
tdSql
.
query
(
f
"select min(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkData
(
0
,
0
,
firstTs
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/system-test/2-query/twa.py
浏览文件 @
c93cb979
...
...
@@ -124,7 +124,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
4.500000000
)
# mixup with other functions
tdSql
.
query
(
f
"select twa(c1),twa(c2),max(c1),elapsed(ts) from
{
dbname
}
.
stb
1 "
)
tdSql
.
query
(
f
"select twa(c1),twa(c2),max(c1),elapsed(ts) from
{
dbname
}
.
ct
1 "
)
tdSql
.
checkData
(
0
,
0
,
1.000000000
)
tdSql
.
checkData
(
0
,
1
,
11111.000000000
)
tdSql
.
checkData
(
0
,
2
,
1
)
...
...
tests/system-test/7-tmq/tmqDelete-multiCtb.py
浏览文件 @
c93cb979
...
...
@@ -325,7 +325,9 @@ class TDTestCase:
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
1
+
1
/
4
+
3
/
4
))
elif
self
.
snapshot
==
1
:
consumerId
=
5
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
1
-
1
/
4
+
1
/
4
+
3
/
4
))
# expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 - 1/4 + 1/4 + 3/4))
# fix case: sometimes only 200 rows are deleted
expectrowcnt
=
int
(
paraDict
[
"rowsPerTbl"
]
*
paraDict
[
"ctbNum"
]
*
(
1
+
1
/
4
+
3
/
4
))
topicList
=
topicFromStb1
ifcheckdata
=
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录