Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a1650cff
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看板
提交
a1650cff
编写于
10月 31, 2022
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test cases
上级
2acf94be
变更
34
隐藏空白更改
内联
并排
Showing
34 changed file
with
106 addition
and
106 deletion
+106
-106
tests/pytest/tag_lite/3.py
tests/pytest/tag_lite/3.py
+1
-1
tests/pytest/tag_lite/4.py
tests/pytest/tag_lite/4.py
+2
-2
tests/pytest/tag_lite/5.py
tests/pytest/tag_lite/5.py
+2
-2
tests/pytest/tag_lite/6.py
tests/pytest/tag_lite/6.py
+2
-2
tests/pytest/tag_lite/TestModifyTag.py
tests/pytest/tag_lite/TestModifyTag.py
+3
-3
tests/pytest/tag_lite/add.py
tests/pytest/tag_lite/add.py
+2
-2
tests/pytest/tag_lite/alter_tag.py
tests/pytest/tag_lite/alter_tag.py
+3
-3
tests/pytest/tag_lite/bigint.py
tests/pytest/tag_lite/bigint.py
+5
-5
tests/pytest/tag_lite/binary.py
tests/pytest/tag_lite/binary.py
+5
-5
tests/pytest/tag_lite/binary_binary.py
tests/pytest/tag_lite/binary_binary.py
+1
-1
tests/pytest/tag_lite/bool.py
tests/pytest/tag_lite/bool.py
+2
-2
tests/pytest/tag_lite/bool_binary.py
tests/pytest/tag_lite/bool_binary.py
+2
-2
tests/pytest/tag_lite/bool_int.py
tests/pytest/tag_lite/bool_int.py
+1
-1
tests/pytest/tag_lite/change.py
tests/pytest/tag_lite/change.py
+2
-2
tests/pytest/tag_lite/column.py
tests/pytest/tag_lite/column.py
+2
-2
tests/pytest/tag_lite/commit.py
tests/pytest/tag_lite/commit.py
+1
-1
tests/pytest/tag_lite/delete.py
tests/pytest/tag_lite/delete.py
+2
-2
tests/pytest/tag_lite/double.py
tests/pytest/tag_lite/double.py
+2
-2
tests/pytest/tag_lite/filter.py
tests/pytest/tag_lite/filter.py
+2
-2
tests/pytest/tag_lite/float.py
tests/pytest/tag_lite/float.py
+2
-2
tests/pytest/tag_lite/int.py
tests/pytest/tag_lite/int.py
+1
-1
tests/pytest/tag_lite/int_binary.py
tests/pytest/tag_lite/int_binary.py
+2
-2
tests/pytest/tag_lite/int_float.py
tests/pytest/tag_lite/int_float.py
+1
-1
tests/pytest/tag_lite/json_tag_extra.py
tests/pytest/tag_lite/json_tag_extra.py
+4
-4
tests/pytest/tag_lite/nchar.py
tests/pytest/tag_lite/nchar.py
+1
-1
tests/pytest/tag_lite/set.py
tests/pytest/tag_lite/set.py
+2
-2
tests/pytest/tag_lite/smallint.py
tests/pytest/tag_lite/smallint.py
+5
-5
tests/pytest/tag_lite/timestamp.py
tests/pytest/tag_lite/timestamp.py
+6
-6
tests/pytest/tag_lite/tinyint.py
tests/pytest/tag_lite/tinyint.py
+5
-5
tests/pytest/tag_lite/too_many_tag_condtions.py
tests/pytest/tag_lite/too_many_tag_condtions.py
+15
-15
tests/pytest/tag_lite/unsignedBigint.py
tests/pytest/tag_lite/unsignedBigint.py
+5
-5
tests/pytest/tag_lite/unsignedInt.py
tests/pytest/tag_lite/unsignedInt.py
+5
-5
tests/pytest/tag_lite/unsignedSmallint.py
tests/pytest/tag_lite/unsignedSmallint.py
+5
-5
tests/pytest/tag_lite/unsignedTinyint.py
tests/pytest/tag_lite/unsignedTinyint.py
+5
-5
未找到文件。
tests/pytest/tag_lite/3.py
浏览文件 @
a1650cff
...
...
@@ -1315,7 +1315,7 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
...
...
tests/pytest/tag_lite/4.py
浏览文件 @
a1650cff
...
...
@@ -1859,8 +1859,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/5.py
浏览文件 @
a1650cff
...
...
@@ -2287,8 +2287,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/6.py
浏览文件 @
a1650cff
...
...
@@ -2735,8 +2735,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/TestModifyTag.py
浏览文件 @
a1650cff
...
...
@@ -50,8 +50,8 @@ class TDTestCase:
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
break
return
buildPath
def
run
(
self
):
...
...
@@ -122,4 +122,4 @@ class TDTestCase:
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
\ No newline at end of file
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/tag_lite/add.py
浏览文件 @
a1650cff
...
...
@@ -2059,8 +2059,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/alter_tag.py
浏览文件 @
a1650cff
...
...
@@ -43,9 +43,9 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
6
,
None
)
tdSql
.
checkData
(
1
,
6
,
'test'
)
# Test case for: https://jira.taosdata.com:18080/browse/TD-2423
# Test case for: https://jira.taosdata.com:18080/browse/TD-2423
tdSql
.
execute
(
"create table stb(ts timestamp, col1 int, col2 nchar(20)) tags(tg1 int, tg2 binary(20), tg3 nchar(25))"
)
tdSql
.
execute
(
"insert into tb1 using stb(tg1, tg3) tags(1, 'test1') values(now, 1, 'test1')"
)
tdSql
.
execute
(
"insert into tb1 using stb(tg1, tg3) tags(1, 'test1') values(now, 1, 'test1')"
)
tdSql
.
query
(
"select *, tg1, tg2, tg3 from tb1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
3
,
1
)
...
...
@@ -61,7 +61,7 @@ class TDTestCase:
#Test case for TS-1285
tdSql
.
execute
(
"create table stb2(ts timestamp, c1 int) tags(t1 timestamp)"
)
tdSql
.
execute
(
"insert into tb3 using stb2 tags('2022-01-01 18:26:50.224') values(now, 1)"
)
tdSql
.
execute
(
"insert into tb3 using stb2 tags('2022-01-01 18:26:50.224') values(now, 1)"
)
tdSql
.
execute
(
"alter table tb3 set tag t1='2022-03-03 18:26:50.224'"
)
tdSql
.
query
(
"select * from stb2"
)
tdSql
.
checkData
(
0
,
2
,
"2022-03-03 18:26:50.224"
)
...
...
tests/pytest/tag_lite/bigint.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -577,15 +577,15 @@ class TDTestCase:
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"create table if not exists st (ts timestamp, tagtype int) tags(dev bigint)"
)
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
63
)
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags(%d)'
%
(
-
1
*
pow
(
2
,
63
)
+
1
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/binary.py
浏览文件 @
a1650cff
...
...
@@ -569,8 +569,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -583,13 +583,13 @@ class TDTestCase:
"create table if not exists st (ts timestamp, tagtype int) tags(dev binary(5))"
)
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags("dev_001")'
)
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags("dev")'
)
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/binary_binary.py
浏览文件 @
a1650cff
...
...
@@ -780,7 +780,7 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
...
...
tests/pytest/tag_lite/bool.py
浏览文件 @
a1650cff
...
...
@@ -564,8 +564,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/bool_binary.py
浏览文件 @
a1650cff
...
...
@@ -774,8 +774,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/bool_int.py
浏览文件 @
a1650cff
...
...
@@ -806,7 +806,7 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
...
...
tests/pytest/tag_lite/change.py
浏览文件 @
a1650cff
...
...
@@ -928,8 +928,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/column.py
浏览文件 @
a1650cff
...
...
@@ -180,8 +180,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/commit.py
浏览文件 @
a1650cff
...
...
@@ -2304,7 +2304,7 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
...
...
tests/pytest/tag_lite/delete.py
浏览文件 @
a1650cff
...
...
@@ -1701,8 +1701,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/double.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/filter.py
浏览文件 @
a1650cff
...
...
@@ -355,8 +355,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/float.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/int.py
浏览文件 @
a1650cff
...
...
@@ -564,7 +564,7 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
...
...
tests/pytest/tag_lite/int_binary.py
浏览文件 @
a1650cff
...
...
@@ -772,8 +772,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/int_float.py
浏览文件 @
a1650cff
...
...
@@ -808,7 +808,7 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
...
...
tests/pytest/tag_lite/json_tag_extra.py
浏览文件 @
a1650cff
...
...
@@ -47,16 +47,16 @@ class TDTestCase:
print
(
"==============step1 tag format ======="
)
tdLog
.
info
(
"create database "
)
tdSql
.
execute
(
"create database db_json"
)
tdSql
.
execute
(
"use db_json"
)
# test tag format
tdSql
.
execute
(
"use db_json"
)
# test tag format
tdSql
.
execute
(
"create table if not exists jsons1(ts timestamp, dataInt int, dataStr nchar(50)) tags(jtag json)"
)
tdSql
.
error
(
"create table if not exists jsons1(ts timestamp, dataInt int, dataStr nchar(50)) tags(jtag json(10000000))"
)
tdSql
.
error
(
"create table if not exists jsons1(ts timestamp, dataInt int, dataStr nchar(50)) tags(jtag json,jtag1 json)"
)
tdSql
.
error
(
"create table if not exists jsons1(ts timestamp, dataInt int, dataStr nchar(50)) tags(jtag json,dataBool bool)"
)
tdSql
.
execute
(
"CREATE TABLE if not exists jsons1_1 using jsons1 tags('{
\"
loc
\"
:
\"
fff
\"
,
\"
id
\"
:5}')"
)
# two stables: jsons1 jsons2 ,test tag's value and key
# two stables: jsons1 jsons2 ,test tag's value and key
tdSql
.
execute
(
"insert into jsons1_1(ts,dataInt) using jsons1 tags('{
\"
loc+
\"
:
\"
fff
\"
,
\"
id
\"
:5}') values (now,12)"
)
tdSql
.
error
(
"CREATE TABLE if not exists jsons1_1 using jsons1 tags('{oc:
\"
fff
\"
,
\"
id
\"
:5}')"
)
...
...
tests/pytest/tag_lite/nchar.py
浏览文件 @
a1650cff
...
...
@@ -35,7 +35,7 @@ class TDTestCase:
'CREATE TABLE if not exists dev_002 using st tags("dev")'
)
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
1
)
...
...
tests/pytest/tag_lite/set.py
浏览文件 @
a1650cff
...
...
@@ -879,8 +879,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
tests/pytest/tag_lite/smallint.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -580,15 +580,15 @@ class TDTestCase:
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
pow
(
2
,
15
))
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
-
1
*
pow
(
2
,
15
)))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
15
)
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags(%d)'
%
(
-
1
*
pow
(
2
,
15
)
+
1
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/timestamp.py
浏览文件 @
a1650cff
...
...
@@ -46,7 +46,7 @@ class TDTestCase:
tdLog
.
info
(
'=============== step2'
)
tdSql
.
query
(
'select * from %s'
%
(
mt
))
tdSql
.
checkRows
(
5
*
rowNum
)
tdSql
.
query
(
'select * from %s where tgTs = %ld and tgcol2 = 0'
%
(
mt
,
ts
))
tdSql
.
checkRows
(
rowNum
)
...
...
@@ -54,7 +54,7 @@ class TDTestCase:
tdSql
.
checkRows
(
rowNum
)
tdLog
.
info
(
'=============== step3'
)
i
=
0
i
=
0
while
(
i
<
5
):
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
100
)
tdLog
.
info
(
'create table %s using %s tags(%d,
\"
%s
\"
, %d)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
100
))
...
...
@@ -80,7 +80,7 @@ class TDTestCase:
tdLog
.
info
(
'=============== step4'
)
i
=
0
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
1000
)
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
1000
)
tdSql
.
execute
(
'insert into %s using %s tags(%d,
\"
%s
\"
, %d) values(now, 10)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
1000
))
tdSql
.
execute
(
'insert into %s using %s tags(%d,
\"
%s
\"
, %d) values(now+2s, 10)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
1000
))
tdSql
.
execute
(
'insert into %s using %s tags(%d,
\"
%s
\"
, %d) values(now+3s, 10)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
1000
))
...
...
@@ -88,11 +88,11 @@ class TDTestCase:
tdSql
.
checkRows
(
3
)
i
=
0
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
10000
)
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
10000
)
tdSql
.
execute
(
'create table %s using %s tags(%d, now, %d)'
%
(
tb
,
mt
,
i
+
10000
,
i
+
10000
))
tdSql
.
checkRows
(
3
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/tag_lite/tinyint.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -581,15 +581,15 @@ class TDTestCase:
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
pow
(
2
,
7
))
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
-
1
*
pow
(
2
,
7
)))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
7
)
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags(%d)'
%
(
-
1
*
pow
(
2
,
7
)
+
1
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/too_many_tag_condtions.py
浏览文件 @
a1650cff
...
...
@@ -13,12 +13,12 @@ class TDTestCase:
def
run
(
self
):
tdSql
.
prepare
()
tdLog
.
info
(
'======================== dnode1 start'
)
tbPrefix
=
"ta_cr_tb"
mtPrefix
=
"ta_cr_mt"
tbNum
=
2
rowNum
=
10
tbNum
=
2
rowNum
=
10
totalNum
=
200
tagCondsLimit
=
1024
tdLog
.
info
(
'=============== step1: create tbl and prepare data'
)
...
...
@@ -26,40 +26,40 @@ class TDTestCase:
i
=
2
mt
=
"%s%d"
%
(
mtPrefix
,
i
)
tb
=
"%s%d"
%
(
tbPrefix
,
i
)
sql
=
'create table %s (ts timestamp, tbcol int) TAGS(tgcol int)'
%
(
mt
)
tdLog
.
info
(
sql
)
tdSql
.
execute
(
sql
)
for
i
in
range
(
0
,
tbNum
):
for
i
in
range
(
0
,
tbNum
):
tblName
=
"%s%d"
%
(
tbPrefix
,
i
)
sql
=
'create table %s using %s TAGS(%d)'
%
(
tblName
,
mt
,
i
)
sql
=
'create table %s using %s TAGS(%d)'
%
(
tblName
,
mt
,
i
)
tdSql
.
execute
(
sql
)
for
j
in
range
(
0
,
rowNum
):
sql
=
"insert into %s values(now, %d)"
%
(
tblName
,
j
)
sql
=
"insert into %s values(now, %d)"
%
(
tblName
,
j
)
tdSql
.
execute
(
sql
)
sqlPrefix
=
"select * from %s where "
%
(
mt
)
sqlPrefix
=
"select * from %s where "
%
(
mt
)
for
i
in
range
(
2
,
2048
,
1
):
conds
=
"tgcol=1 and "
*
(
i
-
1
)
conds
=
"%stgcol=1"
%
(
conds
)
sql
=
"%s%s"
%
(
sqlPrefix
,
conds
)
if
i
>=
tagCondsLimit
:
if
i
>=
tagCondsLimit
:
tdSql
.
error
(
sql
)
else
:
else
:
tdSql
.
query
(
sql
)
#tdSql.checkRows(1)
for
i
in
range
(
2
,
2048
,
1
):
conds
=
""
for
j
in
range
(
0
,
i
-
1
):
conds
=
""
for
j
in
range
(
0
,
i
-
1
):
conds
=
conds
+
"tgcol=%d or "
%
(
j
%
tbNum
)
conds
+=
"tgcol=%d"
%
(
i
%
tbNum
)
sql
=
sqlPrefix
+
conds
sql
=
sqlPrefix
+
conds
if
i
>=
tagCondsLimit
:
tdSql
.
error
(
sql
)
else
:
else
:
tdSql
.
query
(
sql
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/unsignedBigint.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -580,16 +580,16 @@ class TDTestCase:
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
64
)
-
1
))
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
64
)
-
2
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags(%d)'
%
(
0
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_003 using st tags(%s)'
%
(
'NULL'
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/unsignedInt.py
浏览文件 @
a1650cff
...
...
@@ -566,8 +566,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -581,16 +581,16 @@ class TDTestCase:
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
32
)
-
1
))
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
32
)
-
2
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags(%d)'
%
(
0
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_003 using st tags(%s)'
%
(
'NULL'
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/unsignedSmallint.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -580,7 +580,7 @@ class TDTestCase:
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
16
)
-
1
))
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
16
)
-
2
))
tdSql
.
execute
(
...
...
@@ -588,9 +588,9 @@ class TDTestCase:
tdSql
.
execute
(
'CREATE TABLE if not exists dev_003 using st tags(%s)'
%
(
'NULL'
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
def
stop
(
self
):
tdSql
.
close
()
...
...
tests/pytest/tag_lite/unsignedTinyint.py
浏览文件 @
a1650cff
...
...
@@ -565,8 +565,8 @@ class TDTestCase:
tdLog
.
info
(
'show databases'
)
tdSql
.
query
(
'show databases'
)
# TSIM: if $rows != 0 then
tdLog
.
info
(
'tdSql.checkRow(
0
)'
)
tdSql
.
checkRows
(
0
)
tdLog
.
info
(
'tdSql.checkRow(
1
)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
# TSIM: endi
# TSIM:
...
...
@@ -580,16 +580,16 @@ class TDTestCase:
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
8
)
-
1
))
tdSql
.
error
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
-
1
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_001 using st tags(%d)'
%
(
pow
(
2
,
8
)
-
2
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_002 using st tags(%d)'
%
(
0
))
tdSql
.
execute
(
'CREATE TABLE if not exists dev_003 using st tags(%s)'
%
(
'NULL'
))
print
(
"==============step2"
)
print
(
"==============step2"
)
tdSql
.
query
(
"show tables"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
def
stop
(
self
):
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录