Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8778c55f
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
8778c55f
编写于
12月 10, 2021
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed build error test case
上级
19839996
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
10 deletion
+11
-10
src/client/src/tscStream.c
src/client/src/tscStream.c
+1
-1
tests/pytest/stream/new.py
tests/pytest/stream/new.py
+10
-9
未找到文件。
src/client/src/tscStream.c
浏览文件 @
8778c55f
...
...
@@ -985,7 +985,7 @@ void splitStreamSql(const char *str, char **sql, char **to, char **split) {
strcpy
(
*
to
,
p
);
return
;
}
len
=
p2
-
p1
-
LABEL_TO_LEN
;
len
=
(
int32_t
)(
p2
-
p1
-
LABEL_TO_LEN
)
;
*
to
=
(
char
*
)
tmalloc
(
len
+
1
);
strncpy
(
*
to
,
p1
+
LABEL_TO_LEN
,
len
);
(
*
to
)[
len
]
=
0
;
// str end
...
...
tests/pytest/stream/new.py
浏览文件 @
8778c55f
...
...
@@ -27,14 +27,14 @@ class TDTestCase:
def
run
(
self
):
rowNum
=
200
tdSql
.
prepare
()
ts_begin
=
1633017600000
ts_now
=
1633017600000
tdLog
.
info
(
"=============== step1"
)
tdSql
.
execute
(
"create table mt(ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int)"
)
for
i
in
range
(
5
):
tdSql
.
execute
(
"create table tb%d using mt tags(%d)"
%
(
i
,
i
))
for
j
in
range
(
rowNum
):
tdSql
.
execute
(
"insert into tb%d values(%d, %d, %d)"
%
(
i
,
ts_begin
+
j
*
1000
,
j
,
j
))
tdSql
.
execute
(
"insert into tb%d values(%d, %d, %d)"
%
(
i
,
ts_now
,
j
,
j
))
ts_now
+=
1000
time
.
sleep
(
0.1
)
tdLog
.
info
(
"=============== step2"
)
...
...
@@ -46,14 +46,15 @@ class TDTestCase:
tdSql
.
waitedQuery
(
"select * from st"
,
1
,
180
)
delay
=
int
(
time
.
time
()
-
start
)
+
80
v
=
tdSql
.
getData
(
0
,
3
)
if
v
>=
51
:
tdLog
.
exit
(
"value is %d,
which is larger than 51
"
%
v
)
if
v
!=
10
:
tdLog
.
exit
(
"value is %d,
expect is 10.
"
%
v
)
tdLog
.
info
(
"=============== step4"
)
for
i
in
range
(
5
,
10
):
tdSql
.
execute
(
"create table tb%d using mt tags(%d)"
%
(
i
,
i
))
for
j
in
range
(
rowNum
):
tdSql
.
execute
(
"insert into tb%d values(%d, %d, %d)"
%
(
i
,
ts_begin
+
j
*
1000
,
j
,
j
))
tdSql
.
execute
(
"insert into tb%d values(%d, %d, %d)"
%
(
i
,
ts_now
,
j
,
j
))
ts_now
+=
1000
tdLog
.
info
(
"=============== step5"
)
maxValue
=
0
...
...
@@ -63,11 +64,11 @@ class TDTestCase:
v
=
tdSql
.
getData
(
0
,
3
)
if
v
>
maxValue
:
maxValue
=
v
if
v
>
51
:
if
v
>
=
10
:
break
if
maxValue
<
=
51
:
tdLog
.
exit
(
"value is %d,
which is smaller than 51
"
%
maxValue
)
if
maxValue
<
10
:
tdLog
.
exit
(
"value is %d,
expect is 10
"
%
maxValue
)
def
stop
(
self
):
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录