Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
75da3c16
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看板
未验证
提交
75da3c16
编写于
12月 23, 2021
作者:
H
Hui Li
提交者:
GitHub
12月 23, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9285 from wu-champion/cpwu/TD-11970
[TD-11970] <test> add case for TD-11970
上级
397f4629
972ea1d4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
89 addition
and
1 deletion
+89
-1
tests/system-test/1-insert/TD-11970.py
tests/system-test/1-insert/TD-11970.py
+84
-0
tests/system-test/fulltest-insert.sh
tests/system-test/fulltest-insert.sh
+5
-1
未找到文件。
tests/system-test/1-insert/TD-11970.py
0 → 100644
浏览文件 @
75da3c16
###################################################################
# Copyright (c) 2020 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
taos
import
time
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
__init__
(
self
):
self
.
err_case
=
0
self
.
curret_case
=
0
def
caseDescription
(
self
):
'''
case1 <cpwu>: [TD-11970] : there is no err return when create table using now+Ntimes.
'''
return
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
check_td11970
(
self
):
# this case expect all create table sql with now+Ntime is success.
tdSql
.
prepare
()
tdSql
.
execute
(
f
"create stable stb1(ts timestamp, c1 int) tags (tag1 int, tag2 timestamp)"
)
try
:
tdSql
.
execute
(
f
"create table t1 using stb1 tags(1, now-100b)"
)
tdSql
.
execute
(
f
"create table t2 using stb1 tags(2, now-100u)"
)
tdSql
.
execute
(
f
"create table t3 using stb1 tags(3, now-100a)"
)
tdSql
.
execute
(
f
"create table t4 using stb1 tags(4, now-100s)"
)
tdSql
.
execute
(
f
"create table t5 using stb1 tags(5, now-100m)"
)
tdSql
.
execute
(
f
"create table t6 using stb1 tags(6, now-100h)"
)
tdSql
.
execute
(
f
"create table t7 using stb1 tags(7, now-100d)"
)
tdSql
.
execute
(
f
"create table t8 using stb1 tags(8, now-100w)"
)
tdSql
.
execute
(
f
"create table t9 using stb1 tags(9, now+10b)"
)
tdSql
.
execute
(
f
"create table t10 using stb1 tags(10, now+10u)"
)
tdSql
.
execute
(
f
"create table t11 using stb1 tags(11, now+10a)"
)
tdSql
.
execute
(
f
"create table t12 using stb1 tags(12, now+10s)"
)
tdSql
.
execute
(
f
"create table t13 using stb1 tags(13, now+10m)"
)
tdSql
.
execute
(
f
"create table t14 using stb1 tags(14, now+10h)"
)
tdSql
.
execute
(
f
"create table t15 using stb1 tags(15, now+10d)"
)
tdSql
.
execute
(
f
"create table t16 using stb1 tags(16, now+10w)"
)
self
.
curret_case
+=
1
tdLog
.
printNoPrefix
(
"the case for td-11970 run passed"
)
except
:
self
.
err_case
+=
1
tdLog
.
printNoPrefix
(
"the case for td-11970 run failed"
)
pass
def
run
(
self
):
self
.
check_td11970
()
if
self
.
err_case
>
0
:
tdLog
.
exit
(
f
"
{
self
.
err_case
}
case run failed"
)
else
:
tdLog
.
success
(
"all case run passed"
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/system-test/fulltest-insert.sh
浏览文件 @
75da3c16
#python3 ./test.py -f 1-insert/batchInsert.py
python3 ./test.py
-f
1-insert/batchInsert.py
python3 test.py
-f
1-insert/TD-11970.py
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录