Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
95ba74f6
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
95ba74f6
编写于
9月 14, 2022
作者:
W
wade zhang
提交者:
GitHub
9月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16809 from taosdata/3.0test/jcy
test:modify test case for TD-19062 (restart taosd after deleted data)
上级
b1a1049c
39e65ca2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
6 deletion
+16
-6
tests/system-test/1-insert/delete_data.py
tests/system-test/1-insert/delete_data.py
+4
-0
tests/system-test/1-insert/update_data.py
tests/system-test/1-insert/update_data.py
+12
-6
未找到文件。
tests/system-test/1-insert/delete_data.py
浏览文件 @
95ba74f6
...
@@ -81,6 +81,7 @@ class TDTestCase:
...
@@ -81,6 +81,7 @@ class TDTestCase:
'binary'
:
self
.
binary_val
,
'binary'
:
self
.
binary_val
,
'nchar'
:
self
.
nchar_val
'nchar'
:
self
.
nchar_val
}
}
def
insert_base_data
(
self
,
col_type
,
tbname
,
rows
,
base_data
):
def
insert_base_data
(
self
,
col_type
,
tbname
,
rows
,
base_data
):
for
i
in
range
(
rows
):
for
i
in
range
(
rows
):
if
col_type
.
lower
()
==
'tinyint'
:
if
col_type
.
lower
()
==
'tinyint'
:
...
@@ -290,6 +291,9 @@ class TDTestCase:
...
@@ -290,6 +291,9 @@ class TDTestCase:
self
.
delete_data_ntb
()
self
.
delete_data_ntb
()
self
.
delete_data_ctb
()
self
.
delete_data_ctb
()
self
.
delete_data_stb
()
self
.
delete_data_stb
()
tdDnodes
.
stoptaosd
(
1
)
tdDnodes
.
starttaosd
(
1
)
self
.
delete_data_ntb
()
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/system-test/1-insert/update_data.py
浏览文件 @
95ba74f6
...
@@ -154,10 +154,12 @@ class TDTestCase:
...
@@ -154,10 +154,12 @@ class TDTestCase:
up_bool
=
random
.
randint
(
0
,
100
)
%
2
up_bool
=
random
.
randint
(
0
,
100
)
%
2
up_float
=
random
.
uniform
(
constant
.
FLOAT_MIN
,
constant
.
FLOAT_MAX
)
up_float
=
random
.
uniform
(
constant
.
FLOAT_MIN
,
constant
.
FLOAT_MAX
)
up_double
=
random
.
uniform
(
constant
.
DOUBLE_MIN
*
(
1E-300
),
constant
.
DOUBLE_MAX
*
(
1E-300
))
up_double
=
random
.
uniform
(
constant
.
DOUBLE_MIN
*
(
1E-300
),
constant
.
DOUBLE_MAX
*
(
1E-300
))
binary_length
=
random
.
randint
(
0
,
self
.
str_length
)
binary_length
=
[]
nchar_length
=
random
.
randint
(
0
,
self
.
str_length
)
for
i
in
range
(
self
.
str_length
+
1
):
up_binary
=
tdCom
.
getLongName
(
binary_length
)
binary_length
.
append
(
i
)
up_nchar
=
tdCom
.
getLongName
(
nchar_length
)
nchar_length
=
[]
for
i
in
range
(
self
.
str_length
+
1
):
nchar_length
.
append
(
i
)
for
col_name
,
col_type
in
column_dict
.
items
():
for
col_name
,
col_type
in
column_dict
.
items
():
if
tb_type
==
'ntb'
:
if
tb_type
==
'ntb'
:
tdSql
.
execute
(
f
'create table
{
tbname
}
(ts timestamp,
{
col_name
}
{
col_type
}
)'
)
tdSql
.
execute
(
f
'create table
{
tbname
}
(ts timestamp,
{
col_name
}
{
col_type
}
)'
)
...
@@ -188,9 +190,13 @@ class TDTestCase:
...
@@ -188,9 +190,13 @@ class TDTestCase:
elif
col_type
.
lower
()
==
'double'
:
elif
col_type
.
lower
()
==
'double'
:
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_double
,
dbname
)
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_double
,
dbname
)
elif
'binary'
in
col_type
.
lower
():
elif
'binary'
in
col_type
.
lower
():
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_binary
,
dbname
)
for
i
in
binary_length
:
up_binary
=
tdCom
.
getLongName
(
i
)
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_binary
,
dbname
)
elif
'nchar'
in
col_type
.
lower
():
elif
'nchar'
in
col_type
.
lower
():
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_nchar
,
dbname
)
for
i
in
nchar_length
:
up_nchar
=
tdCom
.
getLongName
(
i
)
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
up_nchar
,
dbname
)
elif
col_type
.
lower
()
==
'timestamp'
:
elif
col_type
.
lower
()
==
'timestamp'
:
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
self
.
ts
+
1
,
dbname
)
self
.
update_and_check_data
(
tbname
,
col_name
,
col_type
,
self
.
ts
+
1
,
dbname
)
tdSql
.
execute
(
f
'insert into
{
tbname
}
values(
{
self
.
ts
}
,null)'
)
tdSql
.
execute
(
f
'insert into
{
tbname
}
values(
{
self
.
ts
}
,null)'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录