Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
2777a2f0
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
2777a2f0
编写于
4月 27, 2020
作者:
sangshuduo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix python source code for pep8 standard.
上级
fd76b5f7
变更
67
显示空白变更内容
内联
并排
Showing
67 changed file
with
4037 addition
and
3819 deletion
+4037
-3819
tests/pytest/import_merge/importBlock1H.py
tests/pytest/import_merge/importBlock1H.py
+51
-49
tests/pytest/import_merge/importBlock1HO.py
tests/pytest/import_merge/importBlock1HO.py
+54
-52
tests/pytest/import_merge/importBlock1HPO.py
tests/pytest/import_merge/importBlock1HPO.py
+56
-54
tests/pytest/import_merge/importBlock1S.py
tests/pytest/import_merge/importBlock1S.py
+54
-52
tests/pytest/import_merge/importBlock1Sub.py
tests/pytest/import_merge/importBlock1Sub.py
+54
-52
tests/pytest/import_merge/importBlock1T.py
tests/pytest/import_merge/importBlock1T.py
+51
-49
tests/pytest/import_merge/importBlock1TO.py
tests/pytest/import_merge/importBlock1TO.py
+54
-52
tests/pytest/import_merge/importBlock1TPO.py
tests/pytest/import_merge/importBlock1TPO.py
+56
-54
tests/pytest/import_merge/importBlock2H.py
tests/pytest/import_merge/importBlock2H.py
+51
-49
tests/pytest/import_merge/importBlock2HO.py
tests/pytest/import_merge/importBlock2HO.py
+54
-52
tests/pytest/import_merge/importBlock2HPO.py
tests/pytest/import_merge/importBlock2HPO.py
+56
-54
tests/pytest/import_merge/importBlock2S.py
tests/pytest/import_merge/importBlock2S.py
+54
-52
tests/pytest/import_merge/importBlock2Sub.py
tests/pytest/import_merge/importBlock2Sub.py
+54
-52
tests/pytest/import_merge/importBlock2T.py
tests/pytest/import_merge/importBlock2T.py
+51
-49
tests/pytest/import_merge/importBlock2TO.py
tests/pytest/import_merge/importBlock2TO.py
+54
-52
tests/pytest/import_merge/importBlock2TPO.py
tests/pytest/import_merge/importBlock2TPO.py
+56
-54
tests/pytest/import_merge/importBlockbetween.py
tests/pytest/import_merge/importBlockbetween.py
+57
-55
tests/pytest/import_merge/importCacheFileH.py
tests/pytest/import_merge/importCacheFileH.py
+74
-72
tests/pytest/import_merge/importCacheFileHO.py
tests/pytest/import_merge/importCacheFileHO.py
+77
-75
tests/pytest/import_merge/importCacheFileHPO.py
tests/pytest/import_merge/importCacheFileHPO.py
+81
-77
tests/pytest/import_merge/importCacheFileS.py
tests/pytest/import_merge/importCacheFileS.py
+77
-75
tests/pytest/import_merge/importCacheFileSub.py
tests/pytest/import_merge/importCacheFileSub.py
+77
-75
tests/pytest/import_merge/importCacheFileT.py
tests/pytest/import_merge/importCacheFileT.py
+74
-72
tests/pytest/import_merge/importCacheFileTO.py
tests/pytest/import_merge/importCacheFileTO.py
+77
-75
tests/pytest/import_merge/importCacheFileTPO.py
tests/pytest/import_merge/importCacheFileTPO.py
+81
-77
tests/pytest/import_merge/importDataH2.py
tests/pytest/import_merge/importDataH2.py
+80
-77
tests/pytest/import_merge/importDataHO.py
tests/pytest/import_merge/importDataHO.py
+70
-66
tests/pytest/import_merge/importDataHO2.py
tests/pytest/import_merge/importDataHO2.py
+70
-66
tests/pytest/import_merge/importDataHPO.py
tests/pytest/import_merge/importDataHPO.py
+72
-68
tests/pytest/import_merge/importDataLastH.py
tests/pytest/import_merge/importDataLastH.py
+66
-62
tests/pytest/import_merge/importDataLastHO.py
tests/pytest/import_merge/importDataLastHO.py
+69
-65
tests/pytest/import_merge/importDataLastHPO.py
tests/pytest/import_merge/importDataLastHPO.py
+71
-67
tests/pytest/import_merge/importDataLastS.py
tests/pytest/import_merge/importDataLastS.py
+69
-65
tests/pytest/import_merge/importDataLastSub.py
tests/pytest/import_merge/importDataLastSub.py
+69
-65
tests/pytest/import_merge/importDataLastT.py
tests/pytest/import_merge/importDataLastT.py
+55
-51
tests/pytest/import_merge/importDataLastTO.py
tests/pytest/import_merge/importDataLastTO.py
+58
-54
tests/pytest/import_merge/importDataLastTPO.py
tests/pytest/import_merge/importDataLastTPO.py
+60
-56
tests/pytest/import_merge/importDataS.py
tests/pytest/import_merge/importDataS.py
+58
-54
tests/pytest/import_merge/importDataSub.py
tests/pytest/import_merge/importDataSub.py
+70
-66
tests/pytest/import_merge/importDataT.py
tests/pytest/import_merge/importDataT.py
+55
-51
tests/pytest/import_merge/importDataTO.py
tests/pytest/import_merge/importDataTO.py
+58
-54
tests/pytest/import_merge/importDataTPO.py
tests/pytest/import_merge/importDataTPO.py
+61
-57
tests/pytest/import_merge/importHORestart.py
tests/pytest/import_merge/importHORestart.py
+51
-45
tests/pytest/import_merge/importHPORestart.py
tests/pytest/import_merge/importHPORestart.py
+56
-48
tests/pytest/import_merge/importHRestart.py
tests/pytest/import_merge/importHRestart.py
+48
-44
tests/pytest/import_merge/importHead.py
tests/pytest/import_merge/importHead.py
+49
-47
tests/pytest/import_merge/importHeadOverlap.py
tests/pytest/import_merge/importHeadOverlap.py
+51
-49
tests/pytest/import_merge/importHeadPartOverlap.py
tests/pytest/import_merge/importHeadPartOverlap.py
+49
-47
tests/pytest/import_merge/importLastH.py
tests/pytest/import_merge/importLastH.py
+53
-51
tests/pytest/import_merge/importLastHO.py
tests/pytest/import_merge/importLastHO.py
+56
-54
tests/pytest/import_merge/importLastHPO.py
tests/pytest/import_merge/importLastHPO.py
+58
-56
tests/pytest/import_merge/importLastS.py
tests/pytest/import_merge/importLastS.py
+55
-53
tests/pytest/import_merge/importLastSub.py
tests/pytest/import_merge/importLastSub.py
+56
-54
tests/pytest/import_merge/importLastT.py
tests/pytest/import_merge/importLastT.py
+64
-62
tests/pytest/import_merge/importLastTO.py
tests/pytest/import_merge/importLastTO.py
+67
-65
tests/pytest/import_merge/importLastTPO.py
tests/pytest/import_merge/importLastTPO.py
+68
-66
tests/pytest/import_merge/importSRestart.py
tests/pytest/import_merge/importSRestart.py
+65
-59
tests/pytest/import_merge/importSpan.py
tests/pytest/import_merge/importSpan.py
+53
-47
tests/pytest/import_merge/importSubRestart.py
tests/pytest/import_merge/importSubRestart.py
+65
-59
tests/pytest/import_merge/importTORestart.py
tests/pytest/import_merge/importTORestart.py
+65
-59
tests/pytest/import_merge/importTPORestart.py
tests/pytest/import_merge/importTPORestart.py
+69
-61
tests/pytest/import_merge/importTRestart.py
tests/pytest/import_merge/importTRestart.py
+62
-58
tests/pytest/import_merge/importTail.py
tests/pytest/import_merge/importTail.py
+49
-47
tests/pytest/import_merge/importTailOverlap.py
tests/pytest/import_merge/importTailOverlap.py
+51
-49
tests/pytest/import_merge/importTailPartOverlap.py
tests/pytest/import_merge/importTailPartOverlap.py
+56
-48
tests/pytest/import_merge/importToCommit.py
tests/pytest/import_merge/importToCommit.py
+65
-61
tests/pytest/query/tbname.py
tests/pytest/query/tbname.py
+10
-5
未找到文件。
tests/pytest/import_merge/importBlock1H.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -56,7 +57,7 @@ class TDTestCase:
...
@@ -56,7 +57,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -66,5 +67,6 @@ class TDTestCase:
...
@@ -66,5 +67,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1HO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data before with overlap"
)
tdLog
.
info
(
"import 10 data before with overlap"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1HPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,10 +46,10 @@ class TDTestCase:
...
@@ -45,10 +46,10 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
15
,
43
):
for
rid
in
range
(
15
,
43
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +60,8 @@ class TDTestCase:
...
@@ -59,8 +60,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data before with partly overlap"
)
tdLog
.
info
(
"import 20 data before with partly overlap"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -71,5 +72,6 @@ class TDTestCase:
...
@@ -71,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1S.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 50 data covering existing data"
)
tdLog
.
info
(
"import 50 data covering existing data"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
51
):
for
rid
in
range
(
1
,
51
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1Sub.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data totally repetitive"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1T.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -56,7 +57,7 @@ class TDTestCase:
...
@@ -56,7 +57,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data after"
)
tdLog
.
info
(
"import 1 data after"
)
startTime
=
self
.
startTime
+
38
startTime
=
self
.
startTime
+
38
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -66,5 +67,6 @@ class TDTestCase:
...
@@ -66,5 +67,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1TO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data later with overlap"
)
tdLog
.
info
(
"import 10 data later with overlap"
)
startTime
=
self
.
startTime
+
30
startTime
=
self
.
startTime
+
30
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock1TPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,10 +46,10 @@ class TDTestCase:
...
@@ -45,10 +46,10 @@ class TDTestCase:
tdLog
.
info
(
"import 38 sequential data"
)
tdLog
.
info
(
"import 38 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
31
):
for
rid
in
range
(
1
,
31
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
35
,
43
):
for
rid
in
range
(
35
,
43
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +60,8 @@ class TDTestCase:
...
@@ -59,8 +60,8 @@ class TDTestCase:
tdLog
.
info
(
"import 30 data later with partly overlap"
)
tdLog
.
info
(
"import 30 data later with partly overlap"
)
startTime
=
self
.
startTime
+
25
startTime
=
self
.
startTime
+
25
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
31
):
for
rid
in
range
(
1
,
31
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -71,5 +72,6 @@ class TDTestCase:
...
@@ -71,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2H.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
77
):
for
rid
in
range
(
1
,
77
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -56,7 +57,7 @@ class TDTestCase:
...
@@ -56,7 +57,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -66,5 +67,6 @@ class TDTestCase:
...
@@ -66,5 +67,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2HO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
77
):
for
rid
in
range
(
1
,
77
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data before with overlap"
)
tdLog
.
info
(
"import 10 data before with overlap"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2HPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,10 +46,10 @@ class TDTestCase:
...
@@ -45,10 +46,10 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
15
,
81
):
for
rid
in
range
(
15
,
81
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +60,8 @@ class TDTestCase:
...
@@ -59,8 +60,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data before with partly overlap"
)
tdLog
.
info
(
"import 20 data before with partly overlap"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -71,5 +72,6 @@ class TDTestCase:
...
@@ -71,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2S.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
77
):
for
rid
in
range
(
1
,
77
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 90 data covering existing data"
)
tdLog
.
info
(
"import 90 data covering existing data"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
91
):
for
rid
in
range
(
1
,
91
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2Sub.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
77
):
for
rid
in
range
(
1
,
77
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data totally repetitive"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2T.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
77
):
for
rid
in
range
(
1
,
77
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -56,7 +57,7 @@ class TDTestCase:
...
@@ -56,7 +57,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data after"
)
tdLog
.
info
(
"import 1 data after"
)
startTime
=
self
.
startTime
+
76
startTime
=
self
.
startTime
+
76
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -66,5 +67,6 @@ class TDTestCase:
...
@@ -66,5 +67,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2TO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,8 +46,8 @@ class TDTestCase:
...
@@ -45,8 +46,8 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
77
):
for
rid
in
range
(
1
,
77
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -57,8 +58,8 @@ class TDTestCase:
...
@@ -57,8 +58,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data later with overlap"
)
tdLog
.
info
(
"import 10 data later with overlap"
)
startTime
=
self
.
startTime
+
70
startTime
=
self
.
startTime
+
70
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -69,5 +70,6 @@ class TDTestCase:
...
@@ -69,5 +70,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlock2TPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,10 +46,10 @@ class TDTestCase:
...
@@ -45,10 +46,10 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data"
)
tdLog
.
info
(
"import 76 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
61
):
for
rid
in
range
(
1
,
61
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
65
,
81
):
for
rid
in
range
(
65
,
81
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +60,8 @@ class TDTestCase:
...
@@ -59,8 +60,8 @@ class TDTestCase:
tdLog
.
info
(
"import 30 data later with partly overlap"
)
tdLog
.
info
(
"import 30 data later with partly overlap"
)
startTime
=
self
.
startTime
+
55
startTime
=
self
.
startTime
+
55
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
31
):
for
rid
in
range
(
1
,
31
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -71,5 +72,6 @@ class TDTestCase:
...
@@ -71,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importBlockbetween.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -45,11 +46,11 @@ class TDTestCase:
...
@@ -45,11 +46,11 @@ class TDTestCase:
tdLog
.
info
(
"import 76 sequential data with gap between 2 blocks"
)
tdLog
.
info
(
"import 76 sequential data with gap between 2 blocks"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
39
):
for
rid
in
range
(
1
,
39
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
for
rid
in
range
(
40
,
78
):
for
rid
in
range
(
40
,
78
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -60,8 +61,8 @@ class TDTestCase:
...
@@ -60,8 +61,8 @@ class TDTestCase:
tdLog
.
info
(
"import data into the gap between 2 blocks"
)
tdLog
.
info
(
"import data into the gap between 2 blocks"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
39
,
40
):
for
rid
in
range
(
39
,
40
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -72,5 +73,6 @@ class TDTestCase:
...
@@ -72,5 +73,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileH.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,8 +45,8 @@ class TDTestCase:
...
@@ -44,8 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data again"
)
tdLog
.
info
(
"import 10 data again"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -72,7 +73,7 @@ class TDTestCase:
...
@@ -72,7 +73,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -82,5 +83,6 @@ class TDTestCase:
...
@@ -82,5 +83,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileHO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,8 +45,8 @@ class TDTestCase:
...
@@ -44,8 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data again"
)
tdLog
.
info
(
"import 10 data again"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -73,8 +74,8 @@ class TDTestCase:
...
@@ -73,8 +74,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data before with overlap"
)
tdLog
.
info
(
"import 10 data before with overlap"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
...
@@ -85,5 +86,6 @@ class TDTestCase:
...
@@ -85,5 +86,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileHPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,9 +45,10 @@ class TDTestCase:
...
@@ -44,9 +45,10 @@ class TDTestCase:
tdLog
.
info
(
"import 9 sequential data with gap"
)
tdLog
.
info
(
"import 9 sequential data with gap"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
if
(
rid
==
5
):
continue
if
(
rid
==
5
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
continue
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -62,9 +64,10 @@ class TDTestCase:
...
@@ -62,9 +64,10 @@ class TDTestCase:
tdLog
.
info
(
"import 9 data again with gap"
)
tdLog
.
info
(
"import 9 data again with gap"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
if
(
rid
==
5
):
continue
if
(
rid
==
5
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
continue
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -75,8 +78,8 @@ class TDTestCase:
...
@@ -75,8 +78,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data before with partly overlap"
)
tdLog
.
info
(
"import 20 data before with partly overlap"
)
startTime
=
self
.
startTime
-
3
startTime
=
self
.
startTime
-
3
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
...
@@ -87,5 +90,6 @@ class TDTestCase:
...
@@ -87,5 +90,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileS.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,8 +45,8 @@ class TDTestCase:
...
@@ -44,8 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data again"
)
tdLog
.
info
(
"import 10 data again"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -73,8 +74,8 @@ class TDTestCase:
...
@@ -73,8 +74,8 @@ class TDTestCase:
tdLog
.
info
(
"import 30 data covering existing data"
)
tdLog
.
info
(
"import 30 data covering existing data"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
31
):
for
rid
in
range
(
1
,
31
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
...
@@ -85,5 +86,6 @@ class TDTestCase:
...
@@ -85,5 +86,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileSub.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,8 +45,8 @@ class TDTestCase:
...
@@ -44,8 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data again"
)
tdLog
.
info
(
"import 10 data again"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -73,8 +74,8 @@ class TDTestCase:
...
@@ -73,8 +74,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data totally repetitive"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
startTime
=
self
.
startTime
+
5
startTime
=
self
.
startTime
+
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
...
@@ -85,5 +86,6 @@ class TDTestCase:
...
@@ -85,5 +86,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileT.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,8 +45,8 @@ class TDTestCase:
...
@@ -44,8 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data again"
)
tdLog
.
info
(
"import 10 data again"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -72,7 +73,7 @@ class TDTestCase:
...
@@ -72,7 +73,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"import 1 data later"
)
tdLog
.
info
(
"import 1 data later"
)
startTime
=
self
.
startTime
+
20
startTime
=
self
.
startTime
+
20
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
rid
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -82,5 +83,6 @@ class TDTestCase:
...
@@ -82,5 +83,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileTO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,8 +45,8 @@ class TDTestCase:
...
@@ -44,8 +45,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data again"
)
tdLog
.
info
(
"import 10 data again"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -73,8 +74,8 @@ class TDTestCase:
...
@@ -73,8 +74,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data later with overlap"
)
tdLog
.
info
(
"import 10 data later with overlap"
)
startTime
=
self
.
startTime
+
15
startTime
=
self
.
startTime
+
15
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
...
@@ -85,5 +86,6 @@ class TDTestCase:
...
@@ -85,5 +86,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importCacheFileTPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -44,9 +45,10 @@ class TDTestCase:
...
@@ -44,9 +45,10 @@ class TDTestCase:
tdLog
.
info
(
"import 9 sequential data with gap"
)
tdLog
.
info
(
"import 9 sequential data with gap"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
if
(
rid
==
7
):
continue
if
(
rid
==
7
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
continue
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -62,9 +64,10 @@ class TDTestCase:
...
@@ -62,9 +64,10 @@ class TDTestCase:
tdLog
.
info
(
"import 9 data again with gap"
)
tdLog
.
info
(
"import 9 data again with gap"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
if
(
rid
==
7
):
continue
if
(
rid
==
7
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
continue
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -75,8 +78,8 @@ class TDTestCase:
...
@@ -75,8 +78,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data later with partly overlap"
)
tdLog
.
info
(
"import 20 data later with partly overlap"
)
startTime
=
self
.
startTime
+
5
startTime
=
self
.
startTime
+
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
...
@@ -87,5 +90,6 @@ class TDTestCase:
...
@@ -87,5 +90,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataH2.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,25 +35,27 @@ class TDTestCase:
...
@@ -34,25 +35,27 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
rows
/
2
))
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
rows
/
2
))
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
self
.
rows
/
2
+
1
):
for
rid
in
range
(
1
,
self
.
rows
/
2
+
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -62,30 +65,30 @@ class TDTestCase:
...
@@ -62,30 +65,30 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"================= step7"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rows
/
2
+
1
)
tdSql
.
checkRows
(
self
.
rows
/
2
+
1
)
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"================= step8"
)
tdLog
.
info
(
"import 10 data in batch before"
)
tdLog
.
info
(
"import 10 data in batch before"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
-
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
-
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step9"
)
tdLog
.
info
(
"================= step9"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rows
/
2
+
11
)
tdSql
.
checkRows
(
self
.
rows
/
2
+
11
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataHO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -35,20 +36,22 @@ class TDTestCase:
...
@@ -35,20 +36,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
self
.
rowsPerTable
+
1
):
for
rid
in
range
(
1
,
self
.
rowsPerTable
+
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -64,8 +67,8 @@ class TDTestCase:
...
@@ -64,8 +67,8 @@ class TDTestCase:
tdLog
.
info
(
"import 6 data before with overlap"
)
tdLog
.
info
(
"import 6 data before with overlap"
)
startTime
=
self
.
startTime
-
3
startTime
=
self
.
startTime
-
3
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
7
):
for
rid
in
range
(
1
,
7
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -76,5 +79,6 @@ class TDTestCase:
...
@@ -76,5 +79,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataHO2.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -35,20 +36,22 @@ class TDTestCase:
...
@@ -35,20 +36,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
self
.
rowsPerTable
+
1
):
for
rid
in
range
(
1
,
self
.
rowsPerTable
+
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -65,16 +68,17 @@ class TDTestCase:
...
@@ -65,16 +68,17 @@ class TDTestCase:
startTime
=
self
.
startTime
-
3
startTime
=
self
.
startTime
-
3
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
6
,
0
,
-
1
):
for
rid
in
range
(
6
,
0
,
-
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rowsPerTable
+
3
)
tdSql
.
checkRows
(
self
.
rowsPerTable
+
3
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataHPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -35,22 +36,24 @@ class TDTestCase:
...
@@ -35,22 +36,24 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
tdLog
.
info
(
"import %d sequential data"
%
self
.
rowsPerTable
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
10
):
for
rid
in
range
(
1
,
10
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
14
,
self
.
rowsPerTable
+
5
):
for
rid
in
range
(
14
,
self
.
rowsPerTable
+
5
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -66,17 +69,18 @@ class TDTestCase:
...
@@ -66,17 +69,18 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data before with partly overlap"
)
tdLog
.
info
(
"import 20 data before with partly overlap"
)
startTime
=
self
.
startTime
-
4
startTime
=
self
.
startTime
-
4
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
checkRows
(
self
.
rowsPerTable
+
8
)
tdSql
.
checkRows
(
self
.
rowsPerTable
+
8
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastH.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,20 +35,22 @@ class TDTestCase:
...
@@ -34,20 +35,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
206
):
for
rid
in
range
(
1
,
206
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -62,7 +65,7 @@ class TDTestCase:
...
@@ -62,7 +65,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -72,5 +75,6 @@ class TDTestCase:
...
@@ -72,5 +75,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastHO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,20 +35,22 @@ class TDTestCase:
...
@@ -34,20 +35,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
206
):
for
rid
in
range
(
1
,
206
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -63,8 +66,8 @@ class TDTestCase:
...
@@ -63,8 +66,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 data before with overlap"
)
tdLog
.
info
(
"import 5 data before with overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -75,5 +78,6 @@ class TDTestCase:
...
@@ -75,5 +78,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastHPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,22 +35,24 @@ class TDTestCase:
...
@@ -34,22 +35,24 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
14
,
209
):
for
rid
in
range
(
14
,
209
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -65,8 +68,8 @@ class TDTestCase:
...
@@ -65,8 +68,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data before with partly overlap"
)
tdLog
.
info
(
"import 20 data before with partly overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -77,5 +80,6 @@ class TDTestCase:
...
@@ -77,5 +80,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastS.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,20 +35,22 @@ class TDTestCase:
...
@@ -34,20 +35,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
206
):
for
rid
in
range
(
1
,
206
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -63,8 +66,8 @@ class TDTestCase:
...
@@ -63,8 +66,8 @@ class TDTestCase:
tdLog
.
info
(
"import 250 data covering the existing data"
)
tdLog
.
info
(
"import 250 data covering the existing data"
)
startTime
=
self
.
startTime
-
15
startTime
=
self
.
startTime
-
15
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
251
):
for
rid
in
range
(
1
,
251
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -75,5 +78,6 @@ class TDTestCase:
...
@@ -75,5 +78,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastSub.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,20 +35,22 @@ class TDTestCase:
...
@@ -34,20 +35,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
206
):
for
rid
in
range
(
1
,
206
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -63,8 +66,8 @@ class TDTestCase:
...
@@ -63,8 +66,8 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data totally repetitive"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -75,5 +78,6 @@ class TDTestCase:
...
@@ -75,5 +78,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastT.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,20 +31,22 @@ class TDTestCase:
...
@@ -30,20 +31,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
206
):
for
rid
in
range
(
1
,
206
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -58,7 +61,7 @@ class TDTestCase:
...
@@ -58,7 +61,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 1 data later"
)
tdLog
.
info
(
"import 1 data later"
)
startTime
=
self
.
startTime
+
205
startTime
=
self
.
startTime
+
205
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -68,5 +71,6 @@ class TDTestCase:
...
@@ -68,5 +71,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastTO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,20 +31,22 @@ class TDTestCase:
...
@@ -30,20 +31,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
206
):
for
rid
in
range
(
1
,
206
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +62,8 @@ class TDTestCase:
...
@@ -59,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 data later with overlap"
)
tdLog
.
info
(
"import 5 data later with overlap"
)
startTime
=
self
.
startTime
+
203
startTime
=
self
.
startTime
+
203
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -71,5 +74,6 @@ class TDTestCase:
...
@@ -71,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataLastTPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,22 +31,24 @@ class TDTestCase:
...
@@ -30,22 +31,24 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"More than %d rows less than %d rows will go to data and last file"
%
(
self
.
rows
,
10
+
self
.
rows
))
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 205 sequential data"
)
tdLog
.
info
(
"import 205 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
196
):
for
rid
in
range
(
1
,
196
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
200
,
210
):
for
rid
in
range
(
200
,
210
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +64,8 @@ class TDTestCase:
...
@@ -61,8 +64,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data later with partly overlap"
)
tdLog
.
info
(
"import 20 data later with partly overlap"
)
startTime
=
self
.
startTime
+
192
startTime
=
self
.
startTime
+
192
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -73,5 +76,6 @@ class TDTestCase:
...
@@ -73,5 +76,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataS.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,20 +31,22 @@ class TDTestCase:
...
@@ -30,20 +31,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +62,8 @@ class TDTestCase:
...
@@ -59,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 30 data covering the existing data"
)
tdLog
.
info
(
"import 30 data covering the existing data"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
31
):
for
rid
in
range
(
1
,
31
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -71,5 +74,6 @@ class TDTestCase:
...
@@ -71,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataSub.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,25 +35,27 @@ class TDTestCase:
...
@@ -34,25 +35,27 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
rows
/
2
))
tdLog
.
info
(
"import %d sequential data"
%
(
self
.
rows
/
2
))
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
self
.
rows
/
2
+
1
):
for
rid
in
range
(
1
,
self
.
rows
/
2
+
1
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdDnodes
.
stop
(
1
)
tdDnodes
.
stop
(
1
)
...
@@ -63,18 +66,19 @@ class TDTestCase:
...
@@ -63,18 +66,19 @@ class TDTestCase:
tdLog
.
info
(
"import 10 data totally repetitive"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
startTime
=
self
.
startTime
+
10
startTime
=
self
.
startTime
+
10
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step9"
)
tdLog
.
info
(
"================= step9"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
tdSql
.
checkRows
(
self
.
rows
/
2
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataT.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,20 +31,22 @@ class TDTestCase:
...
@@ -30,20 +31,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -58,7 +61,7 @@ class TDTestCase:
...
@@ -58,7 +61,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 1 data later"
)
tdLog
.
info
(
"import 1 data later"
)
startTime
=
self
.
startTime
+
20
startTime
=
self
.
startTime
+
20
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -68,5 +71,6 @@ class TDTestCase:
...
@@ -68,5 +71,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataTO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,20 +31,22 @@ class TDTestCase:
...
@@ -30,20 +31,22 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +62,8 @@ class TDTestCase:
...
@@ -59,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 6 data later with overlap"
)
tdLog
.
info
(
"import 6 data later with overlap"
)
startTime
=
self
.
startTime
+
18
startTime
=
self
.
startTime
+
18
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
7
):
for
rid
in
range
(
1
,
7
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -71,5 +74,6 @@ class TDTestCase:
...
@@ -71,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importDataTPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,22 +31,24 @@ class TDTestCase:
...
@@ -30,22 +31,24 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, speed int)'
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"More than 10 rows less than %d rows will go to data file"
%
self
.
rows
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
18
):
for
rid
in
range
(
1
,
18
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
22
,
25
):
for
rid
in
range
(
22
,
25
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -62,8 +65,8 @@ class TDTestCase:
...
@@ -62,8 +65,8 @@ class TDTestCase:
tdLog
.
info
(
"import 20 data later with partly overlap"
)
tdLog
.
info
(
"import 20 data later with partly overlap"
)
startTime
=
self
.
startTime
+
15
startTime
=
self
.
startTime
+
15
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -74,5 +77,6 @@ class TDTestCase:
...
@@ -74,5 +77,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importHORestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -36,8 +37,10 @@ class TDTestCase:
...
@@ -36,8 +37,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -46,8 +49,10 @@ class TDTestCase:
...
@@ -46,8 +49,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 5 data before with overlap"
)
tdLog
.
info
(
"import 5 data before with overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -62,5 +67,6 @@ class TDTestCase:
...
@@ -62,5 +67,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importHPORestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -36,10 +37,14 @@ class TDTestCase:
...
@@ -36,10 +37,14 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
4
):
for
rid
in
range
(
1
,
4
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
for
rid
in
range
(
6
,
11
):
'import into tb1 values(%ld, %d)'
%
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
6
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -50,7 +55,9 @@ class TDTestCase:
...
@@ -50,7 +55,9 @@ class TDTestCase:
tdLog
.
info
(
"import 8 data before with partly overlap"
)
tdLog
.
info
(
"import 8 data before with partly overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
for
rid
in
range
(
1
,
9
):
for
rid
in
range
(
1
,
9
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -65,5 +72,6 @@ class TDTestCase:
...
@@ -65,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importHRestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -36,8 +37,10 @@ class TDTestCase:
...
@@ -36,8 +37,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -46,7 +49,7 @@ class TDTestCase:
...
@@ -46,7 +49,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -61,5 +64,6 @@ class TDTestCase:
...
@@ -61,5 +64,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importHead.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,8 @@ class TDTestCase:
...
@@ -43,8 +44,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -54,7 +55,7 @@ class TDTestCase:
...
@@ -54,7 +55,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -64,5 +65,6 @@ class TDTestCase:
...
@@ -64,5 +65,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importHeadOverlap.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -36,8 +37,8 @@ class TDTestCase:
...
@@ -36,8 +37,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -47,8 +48,8 @@ class TDTestCase:
...
@@ -47,8 +48,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 5 data before with overlap"
)
tdLog
.
info
(
"import 5 data before with overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -59,5 +60,6 @@ class TDTestCase:
...
@@ -59,5 +60,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importHeadPartOverlap.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -36,12 +37,12 @@ class TDTestCase:
...
@@ -36,12 +37,12 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
4
):
for
rid
in
range
(
1
,
4
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
startTime
+=
2
startTime
+=
2
for
rid
in
range
(
6
,
11
):
for
rid
in
range
(
6
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -52,7 +53,7 @@ class TDTestCase:
...
@@ -52,7 +53,7 @@ class TDTestCase:
tdLog
.
info
(
"import 8 data before with partly overlap"
)
tdLog
.
info
(
"import 8 data before with partly overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
for
rid
in
range
(
1
,
9
):
for
rid
in
range
(
1
,
9
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -63,5 +64,6 @@ class TDTestCase:
...
@@ -63,5 +64,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastH.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,7 +31,7 @@ class TDTestCase:
...
@@ -30,7 +31,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -42,8 +43,8 @@ class TDTestCase:
...
@@ -42,8 +43,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 sequential data"
)
tdLog
.
info
(
"import 5 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -58,7 +59,7 @@ class TDTestCase:
...
@@ -58,7 +59,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 1 data before"
)
tdLog
.
info
(
"import 1 data before"
)
startTime
=
self
.
startTime
-
1
startTime
=
self
.
startTime
-
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -68,5 +69,6 @@ class TDTestCase:
...
@@ -68,5 +69,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastHO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,7 +31,7 @@ class TDTestCase:
...
@@ -30,7 +31,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -42,8 +43,8 @@ class TDTestCase:
...
@@ -42,8 +43,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 sequential data"
)
tdLog
.
info
(
"import 5 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +60,8 @@ class TDTestCase:
...
@@ -59,8 +60,8 @@ class TDTestCase:
tdLog
.
info
(
"import 4 data before with overlap"
)
tdLog
.
info
(
"import 4 data before with overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
5
):
for
rid
in
range
(
1
,
5
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -71,5 +72,6 @@ class TDTestCase:
...
@@ -71,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastHPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,7 +31,7 @@ class TDTestCase:
...
@@ -30,7 +31,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -42,10 +43,10 @@ class TDTestCase:
...
@@ -42,10 +43,10 @@ class TDTestCase:
tdLog
.
info
(
"import 6 sequential data"
)
tdLog
.
info
(
"import 6 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
4
):
for
rid
in
range
(
1
,
4
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
6
,
9
):
for
rid
in
range
(
6
,
9
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -61,8 +62,8 @@ class TDTestCase:
...
@@ -61,8 +62,8 @@ class TDTestCase:
tdLog
.
info
(
"import 8 data before with partly overlap"
)
tdLog
.
info
(
"import 8 data before with partly overlap"
)
startTime
=
self
.
startTime
-
2
startTime
=
self
.
startTime
-
2
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
9
):
for
rid
in
range
(
1
,
9
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -73,5 +74,6 @@ class TDTestCase:
...
@@ -73,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastS.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,7 +31,7 @@ class TDTestCase:
...
@@ -30,7 +31,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -42,8 +43,8 @@ class TDTestCase:
...
@@ -42,8 +43,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 sequential data"
)
tdLog
.
info
(
"import 5 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -58,8 +59,8 @@ class TDTestCase:
...
@@ -58,8 +59,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 20 data covering existing data"
)
tdLog
.
info
(
"import 20 data covering existing data"
)
startTime
=
self
.
startTime
-
10
startTime
=
self
.
startTime
-
10
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -70,5 +71,6 @@ class TDTestCase:
...
@@ -70,5 +71,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastSub.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -30,7 +31,7 @@ class TDTestCase:
...
@@ -30,7 +31,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -42,8 +43,8 @@ class TDTestCase:
...
@@ -42,8 +43,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 sequential data"
)
tdLog
.
info
(
"import 5 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -59,8 +60,8 @@ class TDTestCase:
...
@@ -59,8 +60,8 @@ class TDTestCase:
tdLog
.
info
(
"import 3 data totally repetitive"
)
tdLog
.
info
(
"import 3 data totally repetitive"
)
startTime
=
self
.
startTime
+
1
startTime
=
self
.
startTime
+
1
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
4
):
for
rid
in
range
(
1
,
4
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -71,5 +72,6 @@ class TDTestCase:
...
@@ -71,5 +72,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastT.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,7 +35,7 @@ class TDTestCase:
...
@@ -34,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -46,8 +47,8 @@ class TDTestCase:
...
@@ -46,8 +47,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 sequential data"
)
tdLog
.
info
(
"import 5 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -62,7 +63,7 @@ class TDTestCase:
...
@@ -62,7 +63,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 1 data later"
)
tdLog
.
info
(
"import 1 data later"
)
startTime
=
self
.
startTime
+
5
startTime
=
self
.
startTime
+
5
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
1
,
1
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -72,5 +73,6 @@ class TDTestCase:
...
@@ -72,5 +73,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastTO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,7 +35,7 @@ class TDTestCase:
...
@@ -34,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -46,8 +47,8 @@ class TDTestCase:
...
@@ -46,8 +47,8 @@ class TDTestCase:
tdLog
.
info
(
"import 5 sequential data"
)
tdLog
.
info
(
"import 5 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -63,8 +64,8 @@ class TDTestCase:
...
@@ -63,8 +64,8 @@ class TDTestCase:
tdLog
.
info
(
"import 4 data later with overlap"
)
tdLog
.
info
(
"import 4 data later with overlap"
)
startTime
=
self
.
startTime
+
3
startTime
=
self
.
startTime
+
3
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
5
):
for
rid
in
range
(
1
,
5
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -75,5 +76,6 @@ class TDTestCase:
...
@@ -75,5 +76,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importLastTPO.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -34,7 +35,7 @@ class TDTestCase:
...
@@ -34,7 +35,7 @@ class TDTestCase:
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'create database db rows %d'
%
self
.
rows
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
'use db'
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
...
@@ -46,10 +47,10 @@ class TDTestCase:
...
@@ -46,10 +47,10 @@ class TDTestCase:
tdLog
.
info
(
"import 6 sequential data"
)
tdLog
.
info
(
"import 6 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
1
,
4
):
for
rid
in
range
(
1
,
4
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
6
,
9
):
for
rid
in
range
(
6
,
9
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -64,8 +65,8 @@ class TDTestCase:
...
@@ -64,8 +65,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"import 8 data later with partly overlap"
)
tdLog
.
info
(
"import 8 data later with partly overlap"
)
startTime
=
self
.
startTime
+
2
startTime
=
self
.
startTime
+
2
for
rid
in
range
(
1
,
9
):
for
rid
in
range
(
1
,
9
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
...
@@ -76,5 +77,6 @@ class TDTestCase:
...
@@ -76,5 +77,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importSRestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,10 @@ class TDTestCase:
...
@@ -43,8 +44,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -53,8 +56,10 @@ class TDTestCase:
...
@@ -53,8 +56,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 20 data cover existing data"
)
tdLog
.
info
(
"import 20 data cover existing data"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -69,5 +74,6 @@ class TDTestCase:
...
@@ -69,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importSpan.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,10 @@ class TDTestCase:
...
@@ -43,8 +44,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -53,8 +56,10 @@ class TDTestCase:
...
@@ -53,8 +56,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 20 data cover existing data"
)
tdLog
.
info
(
"import 20 data cover existing data"
)
startTime
=
self
.
startTime
-
5
startTime
=
self
.
startTime
-
5
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -64,5 +69,6 @@ class TDTestCase:
...
@@ -64,5 +69,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importSubRestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,10 @@ class TDTestCase:
...
@@ -43,8 +44,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 20 sequential data"
)
tdLog
.
info
(
"import 20 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
21
):
for
rid
in
range
(
1
,
21
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -53,8 +56,10 @@ class TDTestCase:
...
@@ -53,8 +56,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
tdLog
.
info
(
"import 10 data totally repetitive"
)
startTime
=
self
.
startTime
+
5
startTime
=
self
.
startTime
+
5
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -69,5 +74,6 @@ class TDTestCase:
...
@@ -69,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importTORestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,10 @@ class TDTestCase:
...
@@ -43,8 +44,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -53,8 +56,10 @@ class TDTestCase:
...
@@ -53,8 +56,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 6 data after with overlap"
)
tdLog
.
info
(
"import 6 data after with overlap"
)
startTime
=
self
.
startTime
+
8
startTime
=
self
.
startTime
+
8
for
rid
in
range
(
1
,
7
):
for
rid
in
range
(
1
,
7
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -69,5 +74,6 @@ class TDTestCase:
...
@@ -69,5 +74,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importTPORestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,10 +44,14 @@ class TDTestCase:
...
@@ -43,10 +44,14 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
for
rid
in
range
(
8
,
11
):
'import into tb1 values(%ld, %d)'
%
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
8
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -55,8 +60,10 @@ class TDTestCase:
...
@@ -55,8 +60,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 8 data after with partly overlap"
)
tdLog
.
info
(
"import 8 data after with partly overlap"
)
startTime
=
self
.
startTime
+
3
startTime
=
self
.
startTime
+
3
for
rid
in
range
(
1
,
9
):
for
rid
in
range
(
1
,
9
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -71,5 +78,6 @@ class TDTestCase:
...
@@ -71,5 +78,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importTRestart.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,10 @@ class TDTestCase:
...
@@ -43,8 +44,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -53,7 +56,7 @@ class TDTestCase:
...
@@ -53,7 +56,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data after"
)
tdLog
.
info
(
"import 1 data after"
)
startTime
=
self
.
startTime
+
11
startTime
=
self
.
startTime
+
11
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdDnodes
.
forcestop
(
1
)
tdDnodes
.
forcestop
(
1
)
...
@@ -68,5 +71,6 @@ class TDTestCase:
...
@@ -68,5 +71,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importTail.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,8 @@ class TDTestCase:
...
@@ -43,8 +44,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -54,7 +55,7 @@ class TDTestCase:
...
@@ -54,7 +55,7 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 1 data after"
)
tdLog
.
info
(
"import 1 data after"
)
startTime
+=
1
startTime
+=
1
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -64,5 +65,6 @@ class TDTestCase:
...
@@ -64,5 +65,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importTailOverlap.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,8 +44,8 @@ class TDTestCase:
...
@@ -43,8 +44,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 10 sequential data"
)
tdLog
.
info
(
"import 10 sequential data"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
11
):
for
rid
in
range
(
1
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
...
@@ -54,8 +55,8 @@ class TDTestCase:
...
@@ -54,8 +55,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 6 data after with overlap"
)
tdLog
.
info
(
"import 6 data after with overlap"
)
startTime
=
self
.
startTime
+
8
startTime
=
self
.
startTime
+
8
for
rid
in
range
(
1
,
7
):
for
rid
in
range
(
1
,
7
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
,
rid
))
startTime
+=
1
startTime
+=
1
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
...
@@ -66,5 +67,6 @@ class TDTestCase:
...
@@ -66,5 +67,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importTailPartOverlap.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -43,10 +44,14 @@ class TDTestCase:
...
@@ -43,10 +44,14 @@ class TDTestCase:
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
tdLog
.
info
(
"import 8 sequential data with gap"
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
for
rid
in
range
(
1
,
6
):
for
rid
in
range
(
1
,
6
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
for
rid
in
range
(
8
,
11
):
'import into tb1 values(%ld, %d)'
%
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
(
startTime
+
rid
,
rid
))
for
rid
in
range
(
8
,
11
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step3"
)
tdLog
.
info
(
"================= step3"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -55,8 +60,10 @@ class TDTestCase:
...
@@ -55,8 +60,10 @@ class TDTestCase:
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"================= step4"
)
tdLog
.
info
(
"import 8 data after with partly overlap"
)
tdLog
.
info
(
"import 8 data after with partly overlap"
)
startTime
=
self
.
startTime
+
3
startTime
=
self
.
startTime
+
3
for
rid
in
range
(
1
,
9
):
for
rid
in
range
(
1
,
9
):
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
'import into tb1 values(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdLog
.
info
(
"================= step5"
)
tdLog
.
info
(
"================= step5"
)
tdSql
.
query
(
'select * from tb1'
)
tdSql
.
query
(
'select * from tb1'
)
...
@@ -66,5 +73,6 @@ class TDTestCase:
...
@@ -66,5 +73,6 @@ class TDTestCase:
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/import_merge/importToCommit.py
浏览文件 @
2777a2f0
###################################################################
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
# All rights reserved.
#
#
# This file is proprietary and confidential to TAOS Technologies.
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
# expressly provided by the written permission from Jianhui Tao
#
#
###################################################################
###################################################################
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
...
@@ -18,6 +18,7 @@ from util.cases import *
...
@@ -18,6 +18,7 @@ from util.cases import *
from
util.sql
import
*
from
util.sql
import
*
from
util.dnodes
import
*
from
util.dnodes
import
*
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
):
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -38,7 +39,8 @@ class TDTestCase:
...
@@ -38,7 +39,8 @@ class TDTestCase:
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"================= step1"
)
tdLog
.
info
(
"create 1 table"
)
tdLog
.
info
(
"create 1 table"
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, i int)'
)
tdSql
.
execute
(
'create table tb1 (ts timestamp, i int)'
)
tdLog
.
info
(
"one block can import 38 records and totally there are 40 blocks"
)
tdLog
.
info
(
"one block can import 38 records and totally there are 40 blocks"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
"================= step2"
)
tdLog
.
info
(
'insert data until the first commit'
)
tdLog
.
info
(
'insert data until the first commit'
)
...
@@ -47,7 +49,8 @@ class TDTestCase:
...
@@ -47,7 +49,8 @@ class TDTestCase:
startTime
=
self
.
startTime
startTime
=
self
.
startTime
rid0
=
1
rid0
=
1
while
(
True
):
while
(
True
):
sqlcmd
=
'insert into tb1 values(%ld, %d)'
%
(
startTime
+
rid0
*
2
,
rid0
)
sqlcmd
=
'insert into tb1 values(%ld, %d)'
%
(
startTime
+
rid0
*
2
,
rid0
)
tdSql
.
execute
(
sqlcmd
)
tdSql
.
execute
(
sqlcmd
)
rid0
+=
1
rid0
+=
1
vnodes
=
os
.
listdir
(
dataDir
)
vnodes
=
os
.
listdir
(
dataDir
)
...
@@ -59,23 +62,24 @@ class TDTestCase:
...
@@ -59,23 +62,24 @@ class TDTestCase:
tdLog
.
info
(
"import 1 data before "
)
tdLog
.
info
(
"import 1 data before "
)
startTime
=
self
.
startTime
startTime
=
self
.
startTime
sqlcmd
=
[
'import into tb1 values'
]
sqlcmd
=
[
'import into tb1 values'
]
for
rid
in
range
(
3
,
4
):
for
rid
in
range
(
3
,
4
):
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
sqlcmd
.
append
(
'(%ld, %d)'
%
(
startTime
+
rid
,
rid
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdSql
.
execute
(
" "
.
join
(
sqlcmd
))
tdLog
.
info
(
"================= step6"
)
tdLog
.
info
(
"================= step6"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
query
(
'select * from tb1 order by ts desc'
)
tdSql
.
checkRows
(
rid0
-
1
+
1
)
tdSql
.
checkRows
(
rid0
-
1
+
1
)
tdLog
.
info
(
"================= step7"
)
tdLog
.
info
(
"================= step7"
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
query
(
'select count(*) from tb1'
)
tdSql
.
query
(
'select count(*) from tb1'
)
tdSql
.
checkData
(
0
,
0
,
rid0
-
1
+
1
)
tdSql
.
checkData
(
0
,
0
,
rid0
-
1
+
1
)
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/query/tbname.py
浏览文件 @
2777a2f0
...
@@ -26,12 +26,14 @@ class TDTestCase:
...
@@ -26,12 +26,14 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
prepare
()
tdSql
.
execute
(
'create table cars (ts timestamp, speed int) tags(id int)'
)
tdSql
.
execute
(
'create table cars (ts timestamp, speed int) tags(id int)'
)
tdSql
.
execute
(
"create table carzero using cars tags(0)"
)
tdSql
.
execute
(
"create table carzero using cars tags(0)"
)
tdSql
.
execute
(
"create table carone using cars tags(1)"
)
tdSql
.
execute
(
"create table carone using cars tags(1)"
)
tdSql
.
execute
(
"create table cartwo using cars tags(2)"
)
tdSql
.
execute
(
"create table cartwo using cars tags(2)"
)
tdSql
.
execute
(
"insert into carzero values(now, 100) carone values(now, 110)"
)
tdSql
.
execute
(
"insert into carzero values(now, 100) carone values(now, 110)"
)
tdSql
.
query
(
"select * from cars where tbname in ('carzero', 'carone')"
)
tdSql
.
query
(
"select * from cars where tbname in ('carzero', 'carone')"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
...
@@ -39,13 +41,16 @@ class TDTestCase:
...
@@ -39,13 +41,16 @@ class TDTestCase:
tdSql
.
query
(
"select * from cars where tbname in ('carzero', 'cartwo')"
)
tdSql
.
query
(
"select * from cars where tbname in ('carzero', 'cartwo')"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select * from cars where id=1 or tbname in ('carzero', 'cartwo')"
)
tdSql
.
query
(
"select * from cars where id=1 or tbname in ('carzero', 'cartwo')"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
"select * from cars where id=1 and tbname in ('carzero', 'cartwo')"
)
tdSql
.
query
(
"select * from cars where id=1 and tbname in ('carzero', 'cartwo')"
)
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
"select * from cars where id=0 and tbname in ('carzero', 'cartwo')"
)
tdSql
.
query
(
"select * from cars where id=0 and tbname in ('carzero', 'cartwo')"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
"""
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录