Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
41869631
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
41869631
编写于
7月 16, 2022
作者:
W
wenzhouwww@live.cn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update case
上级
2c1a36e7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
16 deletion
+16
-16
tests/system-test/2-query/last_row.py
tests/system-test/2-query/last_row.py
+16
-16
未找到文件。
tests/system-test/2-query/last_row.py
浏览文件 @
41869631
...
...
@@ -26,7 +26,7 @@ class TDTestCase:
tdSql
.
execute
(
"drop database if exists test "
)
tdLog
.
info
(
" prepare datas for auto check abs function "
)
tdSql
.
execute
(
f
" create database test cache
last
{
cache_value
}
"
)
tdSql
.
execute
(
f
" create database test cache
model
{
cache_value
}
"
)
tdSql
.
execute
(
" use test "
)
tdSql
.
execute
(
" create stable stb (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint,
\
c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) tags (t1 int)"
)
...
...
@@ -65,7 +65,7 @@ class TDTestCase:
def
prepare_datas
(
self
,
cache_value
):
tdSql
.
execute
(
"drop database if exists db "
)
create_db_sql
=
f
"create database if not exists db keep 3650 duration 1000 cache
last
{
cache_value
}
"
create_db_sql
=
f
"create database if not exists db keep 3650 duration 1000 cache
model
{
cache_value
}
"
tdSql
.
execute
(
create_db_sql
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
...
...
@@ -129,7 +129,7 @@ class TDTestCase:
tdSql
.
execute
(
"drop database if exists testdb "
)
# prepare datas
tdSql
.
execute
(
f
"create database if not exists testdb keep 3650 duration 1000 cache
last
{
cache_value
}
"
)
f
"create database if not exists testdb keep 3650 duration 1000 cache
model
{
cache_value
}
"
)
tdSql
.
execute
(
" use testdb "
)
tdSql
.
execute
(
f
" create stable stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp , uc1 int unsigned,
\
...
...
@@ -540,7 +540,7 @@ class TDTestCase:
def
check_boundary_values
(
self
):
tdSql
.
execute
(
"drop database if exists bound_test"
)
tdSql
.
execute
(
"create database if not exists bound_test cache
last 2
"
)
tdSql
.
execute
(
"create database if not exists bound_test cache
model 'LAST_ROW'
"
)
time
.
sleep
(
3
)
tdSql
.
execute
(
"use bound_test"
)
tdSql
.
execute
(
...
...
@@ -841,27 +841,27 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step1:create table =============="
)
# cache_last 0
self
.
prepare_datas
(
0
)
self
.
prepare_tag_datas
(
0
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
0
)
self
.
prepare_datas
(
"'NONE' "
)
self
.
prepare_tag_datas
(
"'NONE'"
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
"'NONE'"
)
self
.
basic_query
()
# cache_last 1
self
.
prepare_datas
(
1
)
self
.
prepare_tag_datas
(
1
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
1
)
self
.
prepare_datas
(
"'LAST_ROW'"
)
self
.
prepare_tag_datas
(
"'LAST_ROW'"
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
"'LAST_ROW'"
)
self
.
basic_query
()
# cache_last 2
self
.
prepare_datas
(
2
)
self
.
prepare_tag_datas
(
2
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
2
)
self
.
prepare_datas
(
"'LAST_VALUE'"
)
self
.
prepare_tag_datas
(
"'LAST_VALUE'"
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
"'LAST_VALUE'"
)
self
.
basic_query
()
# cache_last 3
self
.
prepare_datas
(
3
)
self
.
prepare_tag_datas
(
3
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
3
)
self
.
prepare_datas
(
"'BOTH'"
)
self
.
prepare_tag_datas
(
"'BOTH'"
)
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
,
"'BOTH'"
)
self
.
basic_query
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录