Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dgr6878
TDengine
提交
9560f319
T
TDengine
项目概览
dgr6878
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9560f319
编写于
5月 25, 2020
作者:
S
Shuduo Sang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add insert/sparseData.py to test compressing sparse file content.
[TD-412]
上级
dfbe9ace
变更
30
展开全部
隐藏空白更改
内联
并排
Showing
30 changed file
with
2174 addition
and
2083 deletion
+2174
-2083
tests/pytest/insert/randomNullCommit.py
tests/pytest/insert/randomNullCommit.py
+8
-6
tests/pytest/insert/sparseData.py
tests/pytest/insert/sparseData.py
+67
-0
tests/pytest/random-test/random-test.py
tests/pytest/random-test/random-test.py
+1
-0
tests/pytest/table/boundary.py
tests/pytest/table/boundary.py
+6
-2
tests/pytest/tag_lite/3.py
tests/pytest/tag_lite/3.py
+103
-103
tests/pytest/tag_lite/4.py
tests/pytest/tag_lite/4.py
+145
-145
tests/pytest/tag_lite/5.py
tests/pytest/tag_lite/5.py
+171
-171
tests/pytest/tag_lite/6.py
tests/pytest/tag_lite/6.py
+205
-205
tests/pytest/tag_lite/add.py
tests/pytest/tag_lite/add.py
+146
-146
tests/pytest/tag_lite/bigint.py
tests/pytest/tag_lite/bigint.py
+43
-43
tests/pytest/tag_lite/binary.py
tests/pytest/tag_lite/binary.py
+43
-43
tests/pytest/tag_lite/binary_binary.py
tests/pytest/tag_lite/binary_binary.py
+57
-57
tests/pytest/tag_lite/bool.py
tests/pytest/tag_lite/bool.py
+42
-42
tests/pytest/tag_lite/bool_binary.py
tests/pytest/tag_lite/bool_binary.py
+57
-57
tests/pytest/tag_lite/bool_int.py
tests/pytest/tag_lite/bool_int.py
+61
-61
tests/pytest/tag_lite/change.py
tests/pytest/tag_lite/change.py
+97
-97
tests/pytest/tag_lite/column.py
tests/pytest/tag_lite/column.py
+5
-5
tests/pytest/tag_lite/commit.py
tests/pytest/tag_lite/commit.py
+222
-222
tests/pytest/tag_lite/create.py
tests/pytest/tag_lite/create.py
+91
-91
tests/pytest/tag_lite/delete.py
tests/pytest/tag_lite/delete.py
+143
-143
tests/pytest/tag_lite/double.py
tests/pytest/tag_lite/double.py
+43
-43
tests/pytest/tag_lite/filter.py
tests/pytest/tag_lite/filter.py
+9
-9
tests/pytest/tag_lite/float.py
tests/pytest/tag_lite/float.py
+43
-43
tests/pytest/tag_lite/int.py
tests/pytest/tag_lite/int.py
+43
-43
tests/pytest/tag_lite/int_binary.py
tests/pytest/tag_lite/int_binary.py
+57
-57
tests/pytest/tag_lite/int_float.py
tests/pytest/tag_lite/int_float.py
+61
-61
tests/pytest/tag_lite/set.py
tests/pytest/tag_lite/set.py
+102
-102
tests/pytest/tag_lite/smallint.py
tests/pytest/tag_lite/smallint.py
+43
-43
tests/pytest/tag_lite/tinyint.py
tests/pytest/tag_lite/tinyint.py
+43
-43
tests/pytest/util/dnodes.py
tests/pytest/util/dnodes.py
+17
-0
未找到文件。
tests/pytest/insert/randomNullCommit.py
浏览文件 @
9560f319
...
...
@@ -29,7 +29,8 @@ class TDTestCase:
tdSql
.
prepare
()
tdLog
.
info
(
"=============== step1"
)
tdSql
.
execute
(
'create table tb (ts timestamp, speed int, temp float, note binary(5), flag bool)'
)
tdSql
.
execute
(
'create table tb (ts timestamp, speed int, temp float, note binary(5), flag bool)'
)
numOfRecords
=
0
randomList
=
[
10
,
50
,
100
,
500
,
1000
,
5000
]
...
...
@@ -38,23 +39,24 @@ class TDTestCase:
tdLog
.
info
(
"will insert %d records"
%
num
)
for
x
in
range
(
0
,
num
):
tdLog
.
info
(
'insert into tb values (now + %da, NULL, NULL, NULL, TRUE)'
%
x
)
'insert into tb values (now + %da, NULL, NULL, NULL, TRUE)'
%
x
)
tdSql
.
execute
(
'insert into tb values (now + %da, NULL, NULL, NULL, TRUE)'
%
x
)
'insert into tb values (now + %da, NULL, NULL, NULL, TRUE)'
%
x
)
numOfRecords
=
numOfRecords
+
num
tdSql
.
query
(
"select * from tb"
)
tdSql
.
checkRows
(
numOfRecords
)
tdSql
.
checkData
(
numOfRecords
-
num
,
1
,
None
)
tdSql
.
checkData
(
numOfRecords
-
1
,
2
,
None
)
tdSql
.
checkData
(
numOfRecords
-
num
,
1
,
None
)
tdSql
.
checkData
(
numOfRecords
-
1
,
2
,
None
)
tdLog
.
info
(
"stop dnode to commit data to disk"
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
start
(
1
)
tdLog
.
sleep
(
5
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
tests/pytest/insert/sparseData.py
0 → 100644
浏览文件 @
9560f319
###################################################################
# Copyright (c) 2016 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
sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
tdLog
.
info
(
"=============== step1"
)
tdSql
.
execute
(
'create table tb (ts timestamp, speed int, temp float, note binary(4000), flag bool)'
)
numOfRecords
=
1000000
dividend
=
1000
tdLog
.
info
(
"will insert %d records"
%
numOfRecords
)
ts
=
1500000000000
for
i
in
range
(
0
,
numOfRecords
):
if
(
i
%
dividend
):
print
(
"."
,
end
=
""
)
tdSql
.
execute
(
'insert into tb values (%d + %da, NULL, NULL, NULL, TRUE)'
%
(
ts
,
i
))
else
:
print
(
"a"
,
end
=
""
)
tdSql
.
execute
(
'insert into tb values (%d + %da, NULL, NULL, "a", FALSE)'
%
(
ts
,
i
))
tdSql
.
query
(
"select * from tb"
)
tdSql
.
checkRows
(
numOfRecords
)
tdSql
.
checkData
(
numOfRecords
-
dividend
,
3
,
'a'
)
tdSql
.
checkData
(
numOfRecords
-
dividend
-
1
,
3
,
None
)
tdLog
.
info
(
"stop dnode to commit data to disk"
)
tdDnodes
.
stop
(
1
)
tdLog
.
info
(
"dnodes:%d size is %d"
%
(
1
,
tdDnodes
.
getDataSize
(
1
)))
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/random-test/random-test.py
浏览文件 @
9560f319
...
...
@@ -121,6 +121,7 @@ class Test:
tdDnodes
.
start
(
1
)
tdSql
.
prepare
()
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
...
tests/pytest/table/boundary.py
浏览文件 @
9560f319
...
...
@@ -98,12 +98,16 @@ class TDTestCase:
# create a super table with name exceed max length
sname
=
self
.
generateString
(
maxTableNameLen
+
1
)
tdLog
.
info
(
"create a super table with length %d"
%
len
(
sname
))
tdSql
.
error
(
"create table %s (ts timestamp, value int) tags(id int)"
%
sname
)
tdSql
.
error
(
"create table %s (ts timestamp, value int) tags(id int)"
%
sname
)
# create a super table with name of max length
sname
=
self
.
generateString
(
maxTableNameLen
)
tdLog
.
info
(
"create a super table with length %d"
%
len
(
sname
))
tdSql
.
execute
(
"create table %s (ts timestamp, value int) tags(id int)"
%
sname
)
tdSql
.
execute
(
"create table %s (ts timestamp, value int) tags(id int)"
%
sname
)
tdLog
.
info
(
"check table count, should be one"
)
tdSql
.
query
(
'show stables'
)
tdSql
.
checkRows
(
1
)
...
...
tests/pytest/tag_lite/3.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/4.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/5.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/6.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/add.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bigint.py
浏览文件 @
9560f319
...
...
@@ -82,10 +82,10 @@ class TDTestCase:
(
tb
,
ms
,
x
))
# TSIM: $x = $x + 1
x
=
x
+
1
#TSIM: endw
#
TSIM: endw
# TSIM: $i = $i + 1
i
=
i
+
1
#TSIM: endw
#
TSIM: endw
# TSIM: while $i < 10
while
(
i
<
10
):
# TSIM: $tb = $tbPrefix . $i
...
...
@@ -108,10 +108,10 @@ class TDTestCase:
(
tb
,
ms
,
x
))
# TSIM: $x = $x + 1
x
=
x
+
1
#TSIM: endw
#
TSIM: endw
# TSIM: $i = $i + 1
i
=
i
+
1
#TSIM: endw
#
TSIM: endw
# TSIM:
# TSIM: print =============== step2
tdLog
.
info
(
'=============== step2'
)
...
...
@@ -123,7 +123,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow($rowNum)'
)
tdSql
.
checkRows
(
rowNum
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m
tdLog
.
info
(
'select * from %s where ts < now + 4m'
%
(
tb
))
tdSql
.
query
(
'select * from %s where ts < now + 4m'
%
(
tb
))
...
...
@@ -131,7 +131,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(5)'
)
tdSql
.
checkRows
(
5
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts <= now + 4m
tdLog
.
info
(
'select * from %s where ts <= now + 4m'
%
(
tb
))
tdSql
.
query
(
'select * from %s where ts <= now + 4m'
%
(
tb
))
...
...
@@ -139,7 +139,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(5)'
)
tdSql
.
checkRows
(
5
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m
tdLog
.
info
(
'select * from %s where ts > now + 4m'
%
(
tb
))
tdSql
.
query
(
'select * from %s where ts > now + 4m'
%
(
tb
))
...
...
@@ -147,7 +147,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(15)'
)
tdSql
.
checkRows
(
15
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts >= now + 4m
tdLog
.
info
(
'select * from %s where ts >= now + 4m'
%
(
tb
))
tdSql
.
query
(
'select * from %s where ts >= now + 4m'
%
(
tb
))
...
...
@@ -155,7 +155,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(15)'
)
tdSql
.
checkRows
(
15
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 5m
tdLog
.
info
(
'select * from %s where ts > now + 4m and ts < now + 5m'
%
...
...
@@ -167,7 +167,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts < now + 4m and ts > now + 5m
tdLog
.
info
(
'select * from %s where ts < now + 4m and ts > now + 5m'
%
...
...
@@ -179,7 +179,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts > 100000 and ts < 100000
tdLog
.
info
(
'select * from %s where ts > 100000 and ts < 100000'
%
(
tb
))
tdSql
.
query
(
...
...
@@ -189,7 +189,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts < now + 3m
tdLog
.
info
(
'select * from %s where ts > now + 4m and ts < now + 3m'
%
...
...
@@ -201,7 +201,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $tb where ts > now + 4m and ts > now + 5m and
# ts < now + 6m
tdLog
.
info
(
...
...
@@ -214,7 +214,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step3
tdLog
.
info
(
'=============== step3'
)
...
...
@@ -225,7 +225,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow($totalNum)'
)
tdSql
.
checkRows
(
totalNum
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where ts < now + 4m
tdLog
.
info
(
'select * from %s where ts < now + 4m'
%
(
mt
))
...
...
@@ -234,7 +234,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(50)'
)
tdSql
.
checkRows
(
50
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m
tdLog
.
info
(
'select * from %s where ts > now + 4m'
%
(
mt
))
tdSql
.
query
(
'select * from %s where ts > now + 4m'
%
(
mt
))
...
...
@@ -242,7 +242,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(150)'
)
tdSql
.
checkRows
(
150
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts = now + 4m
tdLog
.
info
(
'select * from %s where ts = now + 4m'
%
(
mt
))
tdSql
.
query
(
'select * from %s where ts = now + 4m'
%
(
mt
))
...
...
@@ -250,7 +250,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m
tdLog
.
info
(
'select * from %s where ts > now + 4m and ts < now + 5m'
%
...
...
@@ -262,7 +262,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(10)'
)
tdSql
.
checkRows
(
10
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step4
tdLog
.
info
(
'=============== step4'
)
...
...
@@ -273,7 +273,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol <> 0
tdLog
.
info
(
'select * from %s where tgcol <> 0'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol <> 0'
%
(
mt
))
...
...
@@ -281,7 +281,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol = 1
tdLog
.
info
(
'select * from %s where tgcol = 1'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol = 1'
%
(
mt
))
...
...
@@ -289,7 +289,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol <> 1
tdLog
.
info
(
'select * from %s where tgcol <> 1'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol <> 1'
%
(
mt
))
...
...
@@ -297,7 +297,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol = 1
tdLog
.
info
(
'select * from %s where tgcol = 1'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol = 1'
%
(
mt
))
...
...
@@ -305,7 +305,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol <> 1
tdLog
.
info
(
'select * from %s where tgcol <> 1'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol <> 1'
%
(
mt
))
...
...
@@ -313,7 +313,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol = 0
tdLog
.
info
(
'select * from %s where tgcol = 0'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol = 0'
%
(
mt
))
...
...
@@ -321,7 +321,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where tgcol <> 0
tdLog
.
info
(
'select * from %s where tgcol <> 0'
%
(
mt
))
tdSql
.
query
(
'select * from %s where tgcol <> 0'
%
(
mt
))
...
...
@@ -329,7 +329,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(100)'
)
tdSql
.
checkRows
(
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step5
tdLog
.
info
(
'=============== step5'
)
...
...
@@ -342,7 +342,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(75)'
)
tdSql
.
checkRows
(
75
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 1
tdLog
.
info
(
'select * from %s where ts > now + 4m and tgcol <> 1'
%
...
...
@@ -354,7 +354,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(75)'
)
tdSql
.
checkRows
(
75
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol = 0
tdLog
.
info
(
'select * from %s where ts < now + 4m and tgcol = 0'
%
(
mt
))
tdSql
.
query
(
...
...
@@ -364,7 +364,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(25)'
)
tdSql
.
checkRows
(
25
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts < now + 4m and tgcol <> 0
tdLog
.
info
(
'select * from %s where ts < now + 4m and tgcol <> 0'
%
...
...
@@ -376,7 +376,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(25)'
)
tdSql
.
checkRows
(
25
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol = 0
tdLog
.
info
(
'select * from %s where ts <= now + 4m and tgcol = 0'
%
...
...
@@ -388,7 +388,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(25)'
)
tdSql
.
checkRows
(
25
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts <= now + 4m and tgcol <> 0
tdLog
.
info
(
'select * from %s where ts <= now + 4m and tgcol <> 0'
%
...
...
@@ -400,7 +400,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(25)'
)
tdSql
.
checkRows
(
25
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and ts < now + 5m and
# tgcol <> 0
tdLog
.
info
(
...
...
@@ -413,7 +413,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(5)'
)
tdSql
.
checkRows
(
5
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: sql select * from $mt where ts > now + 4m and tgcol <> 0 and ts
# < now + 5m
tdLog
.
info
(
...
...
@@ -426,7 +426,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(5)'
)
tdSql
.
checkRows
(
5
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step6
tdLog
.
info
(
'=============== step6'
)
...
...
@@ -444,7 +444,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 200)'
)
tdSql
.
checkData
(
0
,
0
,
200
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step7
tdLog
.
info
(
'=============== step7'
)
...
...
@@ -462,7 +462,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step8
tdLog
.
info
(
'=============== step8'
)
...
...
@@ -480,7 +480,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 50)'
)
tdSql
.
checkData
(
0
,
0
,
50
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step9
tdLog
.
info
(
'=============== step9'
)
...
...
@@ -498,7 +498,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step10
tdLog
.
info
(
'=============== step10'
)
...
...
@@ -517,7 +517,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step11
tdLog
.
info
(
'=============== step11'
)
...
...
@@ -536,7 +536,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 25)'
)
tdSql
.
checkData
(
0
,
0
,
25
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM:
# TSIM: print =============== step12
...
...
@@ -556,7 +556,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 1, 100)'
)
tdSql
.
checkData
(
0
,
1
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== clear
tdLog
.
info
(
'=============== clear'
)
...
...
@@ -570,7 +570,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: system sh/exec.sh -n dnode1 -s stop -x SIGINT
# convert end
...
...
tests/pytest/tag_lite/binary.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/binary_binary.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bool.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bool_binary.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/bool_int.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/change.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/column.py
浏览文件 @
9560f319
...
...
@@ -103,7 +103,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(4)'
)
tdSql
.
checkRows
(
4
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step3
tdLog
.
info
(
'=============== step3'
)
...
...
@@ -149,7 +149,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step5
tdLog
.
info
(
'=============== step5'
)
...
...
@@ -160,7 +160,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(4)'
)
tdSql
.
checkRows
(
4
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: sql select * from $mt where tgcol = 1
tdLog
.
info
(
'select * from %s where tgcol = 1'
%
(
mt
))
...
...
@@ -169,7 +169,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== clear
tdLog
.
info
(
'=============== clear'
)
...
...
@@ -183,7 +183,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: system sh/exec.sh -n dnode1 -s stop -x SIGINT
# convert end
...
...
tests/pytest/tag_lite/commit.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/create.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/delete.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/double.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/filter.py
浏览文件 @
9560f319
...
...
@@ -120,7 +120,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol),
# max(tbcol), first(tbcol), last(tbcol) from $mt where tg = '1' -x
...
...
@@ -162,12 +162,12 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(1)'
)
tdSql
.
checkRows
(
1
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM: if $data00 != 10 then
tdLog
.
info
(
'tdSql.checkData(0, 0, 10)'
)
tdSql
.
checkData
(
0
,
0
,
10
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step5
tdLog
.
info
(
'=============== step5'
)
...
...
@@ -194,7 +194,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 200)'
)
tdSql
.
checkData
(
0
,
0
,
200
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step6
tdLog
.
info
(
'=============== step6'
)
...
...
@@ -263,7 +263,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step11
tdLog
.
info
(
'=============== step11'
)
...
...
@@ -293,7 +293,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step14
tdLog
.
info
(
'=============== step14'
)
...
...
@@ -313,7 +313,7 @@ class TDTestCase:
# TSIM: print expect 100, actual $data00
tdLog
.
info
(
'expect 100, actual $data00'
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== step15
tdLog
.
info
(
'=============== step15'
)
...
...
@@ -344,7 +344,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkData(0, 0, 100)'
)
tdSql
.
checkData
(
0
,
0
,
100
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: print =============== clear
tdLog
.
info
(
'=============== clear'
)
...
...
@@ -358,7 +358,7 @@ class TDTestCase:
tdLog
.
info
(
'tdSql.checkRow(0)'
)
tdSql
.
checkRows
(
0
)
# TSIM: return -1
#TSIM: endi
#
TSIM: endi
# TSIM:
# TSIM: system sh/exec.sh -n dnode1 -s stop -x SIGINT
# convert end
...
...
tests/pytest/tag_lite/float.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/int.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/int_binary.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/int_float.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/set.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/smallint.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/tag_lite/tinyint.py
浏览文件 @
9560f319
此差异已折叠。
点击以展开。
tests/pytest/util/dnodes.py
浏览文件 @
9560f319
...
...
@@ -99,6 +99,19 @@ class TDDnode:
def
setValgrind
(
self
,
value
):
self
.
valgrind
=
value
def
getDataSize
(
self
):
totalSize
=
0
if
(
self
.
deployed
==
1
):
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
self
.
dataDir
):
for
f
in
filenames
:
fp
=
os
.
path
.
join
(
dirpath
,
f
)
if
not
os
.
path
.
islink
(
fp
):
totalSize
=
totalSize
+
os
.
path
.
getsize
(
fp
)
return
totalSize
def
deploy
(
self
):
self
.
logDir
=
"%s/pysim/dnode%d/log"
%
(
self
.
path
,
self
.
index
)
self
.
dataDir
=
"%s/pysim/dnode%d/data"
%
(
self
.
path
,
self
.
index
)
...
...
@@ -384,6 +397,10 @@ class TDDnodes:
self
.
check
(
index
)
self
.
dnodes
[
index
-
1
].
stop
()
def
getDataSize
(
self
,
index
):
self
.
check
(
index
)
return
self
.
dnodes
[
index
-
1
].
getDataSize
()
def
forcestop
(
self
,
index
):
self
.
check
(
index
)
self
.
dnodes
[
index
-
1
].
forcestop
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录