Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
881a5506
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看板
提交
881a5506
编写于
6月 15, 2021
作者:
B
bryanchang0603
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-4366 adding sleep to prevent time problem]
上级
b01865f6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
10 deletion
+13
-10
tests/pytest/alter/alter_keep.py
tests/pytest/alter/alter_keep.py
+10
-10
tests/pytest/client/change_time_1_1.py
tests/pytest/client/change_time_1_1.py
+2
-0
tests/pytest/client/change_time_1_2.py
tests/pytest/client/change_time_1_2.py
+1
-0
未找到文件。
tests/pytest/alter/alter_keep.py
浏览文件 @
881a5506
...
...
@@ -15,6 +15,7 @@ import sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
time
class
TDTestCase
:
...
...
@@ -129,9 +130,6 @@ class TDTestCase:
tdSql
.
prepare
()
##TODO: need to wait for TD-4445 to implement the following
## tests
## preset the keep
tdSql
.
prepare
()
...
...
@@ -176,20 +174,22 @@ class TDTestCase:
tdSql
.
error
(
'insert into tb values (now-15d, 10)'
)
tdSql
.
query
(
'select * from tb'
)
tdSql
.
checkRows
(
rowNum
)
tdLog
.
notice
(
'testing keep will be altered if sudden change from small to big'
)
tdSql
.
execute
(
'alter database db keep 14,14,14'
)
tdSql
.
execute
(
'alter database db keep 15,15,15'
)
tdSql
.
execute
(
'insert into tb values (now-15d, 10)'
)
tdSql
.
query
(
'select * from tb'
)
tdSql
.
checkRows
(
rowNum
+
1
)
for
i
in
range
(
30
):
tdSql
.
execute
(
'alter database db keep 14,14,14'
)
tdSql
.
execute
(
'alter database db keep 16,16,16'
)
tdSql
.
execute
(
'insert into tb values (now-15d, 10)'
)
tdSql
.
query
(
'select * from tb'
)
rowNum
+=
1
tdSql
.
checkRows
(
rowNum
)
tdLog
.
notice
(
'testing keep will be altered if sudden change from big to small'
)
tdSql
.
execute
(
'alter database db keep 16,16,16'
)
tdSql
.
execute
(
'alter database db keep 14,14,14'
)
tdSql
.
error
(
'insert into tb values (now-15d, 10)'
)
tdSql
.
query
(
'select * from tb'
)
tdSql
.
checkRows
(
rowNum
+
1
)
tdSql
.
checkRows
(
rowNum
)
...
...
tests/pytest/client/change_time_1_1.py
浏览文件 @
881a5506
...
...
@@ -19,6 +19,7 @@ from util.pathFinding import *
from
util.dnodes
import
tdDnodes
from
datetime
import
datetime
import
subprocess
import
time
##TODO: this is now automatic, but not sure if this will run through jenkins
class
TDTestCase
:
...
...
@@ -63,6 +64,7 @@ class TDTestCase:
tdSql
.
query
(
'select first(ts) from stb_0'
)
tdSql
.
checkData
(
0
,
0
,
datetime
(
2020
,
10
,
14
,
8
,
0
,
0
,
0
))
#check the last data in the database
os
.
system
(
'sudo timedatectl set-ntp on'
)
time
.
sleep
(
5
)
def
stop
(
self
):
os
.
system
(
'sudo timedatectl set-ntp on'
)
...
...
tests/pytest/client/change_time_1_2.py
浏览文件 @
881a5506
...
...
@@ -71,6 +71,7 @@ class TDTestCase:
else
:
tdLog
.
debug
(
"data file number correct"
)
os
.
system
(
'sudo timedatectl set-ntp on'
)
time
.
sleep
(
5
)
def
stop
(
self
):
os
.
system
(
'sudo timedatectl set-ntp on'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录