Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5680bf3e
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
未验证
提交
5680bf3e
编写于
8月 16, 2022
作者:
H
Hui Li
提交者:
GitHub
8月 16, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16114 from taosdata/test/crash_gen_enh_datetime
test : update method about get current time
上级
b2e0b81a
35359ed4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
7 deletion
+5
-7
tests/pytest/crash_gen/crash_gen_main.py
tests/pytest/crash_gen/crash_gen_main.py
+1
-1
tests/pytest/crash_gen/shared/misc.py
tests/pytest/crash_gen/shared/misc.py
+1
-1
tests/system-test/2-query/irate.py
tests/system-test/2-query/irate.py
+2
-4
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+1
-1
未找到文件。
tests/pytest/crash_gen/crash_gen_main.py
浏览文件 @
5680bf3e
...
...
@@ -1120,7 +1120,7 @@ class Database:
@
classmethod
def
setupLastTick
(
cls
):
# start time will be auto generated , start at 10 years ago local time
local_time
=
datetime
.
datetime
.
utc
now
().
strftime
(
'%Y-%m-%d %H:%M:%S.%f'
)[:
-
16
]
local_time
=
datetime
.
datetime
.
now
().
strftime
(
'%Y-%m-%d %H:%M:%S.%f'
)[:
-
16
]
local_epoch_time
=
[
int
(
i
)
for
i
in
local_time
.
split
(
"-"
)]
#local_epoch_time will be such as : [2022, 7, 18]
...
...
tests/pytest/crash_gen/shared/misc.py
浏览文件 @
5680bf3e
...
...
@@ -46,7 +46,7 @@ class Logging:
@
classmethod
def
_get_datetime
(
cls
):
return
datetime
.
utc
now
().
strftime
(
'%Y-%m-%d %H:%M:%S.%f'
)[:
-
1
]
return
datetime
.
now
().
strftime
(
'%Y-%m-%d %H:%M:%S.%f'
)[:
-
1
]
@
classmethod
def
getLogger
(
cls
):
...
...
tests/system-test/2-query/irate.py
浏览文件 @
5680bf3e
...
...
@@ -69,7 +69,7 @@ class TDTestCase:
comput_irate_value
=
origin_result
[
1
][
0
]
*
1000
/
(
origin_result
[
1
][
-
1
]
-
origin_result
[
0
][
-
1
])
else
:
comput_irate_value
=
(
origin_result
[
1
][
0
]
-
origin_result
[
0
][
0
])
*
1000
/
(
origin_result
[
1
][
-
1
]
-
origin_result
[
0
][
-
1
])
if
abs
(
comput_irate_value
-
irate_value
)
<=
0.001
:
if
abs
(
comput_irate_value
-
irate_value
)
<=
0.00
0000
1
:
tdLog
.
info
(
" irate work as expected , sql is %s "
%
irate_sql
)
else
:
tdLog
.
exit
(
" irate work not as expected , sql is %s "
%
irate_sql
)
...
...
@@ -78,11 +78,9 @@ class TDTestCase:
# prepare datas
tdSql
.
execute
(
f
"create database if not exists
{
dbname
}
keep 3650 duration 1000"
)
tdSql
.
execute
(
f
"use
{
dbname
}
"
)
time
.
sleep
(
2
)
tdSql
.
execute
(
f
'''create
s
table
{
dbname
}
.stb1
f
'''create table
{
dbname
}
.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)
tags (t0 timestamp, tag1 int, t2 bigint, t3 smallint, t4 tinyint, t5 float, t6 double, t7 bool, t8 binary(16),t9 nchar(32))
'''
...
...
tests/system-test/fulltest.sh
浏览文件 @
5680bf3e
...
...
@@ -113,7 +113,7 @@ python3 ./test.py -f 2-query/hyperloglog.py -R
python3 ./test.py
-f
2-query/interp.py
python3 ./test.py
-f
2-query/interp.py
-R
python3 ./test.py
-f
2-query/irate.py
python3 ./test.py
-f
2-query/irate.py
-R
#
python3 ./test.py -f 2-query/irate.py -R
python3 ./test.py
-f
2-query/join.py
python3 ./test.py
-f
2-query/join.py
-R
python3 ./test.py
-f
2-query/last_row.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录