Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a586784c
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a586784c
编写于
2月 18, 2021
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2977]<test>: add test case
上级
b378b691
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
60 addition
and
4 deletion
+60
-4
tests/perftest-scripts/perftest-query.sh
tests/perftest-scripts/perftest-query.sh
+7
-3
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-1
tests/pytest/tag_lite/alter_tag.py
tests/pytest/tag_lite/alter_tag.py
+52
-0
未找到文件。
tests/perftest-scripts/perftest-query.sh
浏览文件 @
a586784c
...
@@ -39,6 +39,8 @@ function buildTDengine {
...
@@ -39,6 +39,8 @@ function buildTDengine {
cd
$WORK_DIR
/TDengine
cd
$WORK_DIR
/TDengine
git remote update
>
/dev/null
git remote update
>
/dev/null
git reset
--hard
HEAD
git checkout develop
REMOTE_COMMIT
=
`
git rev-parse
--short
remotes/origin/develop
`
REMOTE_COMMIT
=
`
git rev-parse
--short
remotes/origin/develop
`
LOCAL_COMMIT
=
`
git rev-parse
--short
@
`
LOCAL_COMMIT
=
`
git rev-parse
--short
@
`
...
@@ -54,14 +56,15 @@ function buildTDengine {
...
@@ -54,14 +56,15 @@ function buildTDengine {
cd
debug
cd
debug
rm
-rf
*
rm
-rf
*
cmake ..
>
/dev/null
cmake ..
>
/dev/null
make
>
/dev/null
make
&&
make
install
>
/dev/null
make
install
fi
fi
}
}
function
runQueryPerfTest
{
function
runQueryPerfTest
{
[
-f
$PERFORMANCE_TEST_REPORT
]
&&
rm
$PERFORMANCE_TEST_REPORT
[
-f
$PERFORMANCE_TEST_REPORT
]
&&
rm
$PERFORMANCE_TEST_REPORT
nohup
$WORK_DIR
/TDengine/debug/build/bin/taosd
-c
/etc/taosperf/
>
/dev/null 2>&1 &
nohup
$WORK_DIR
/TDengine/debug/build/bin/taosd
-c
/etc/taosperf/
>
/dev/null 2>&1 &
echoInfo
"Wait TDengine to start"
sleep
60
echoInfo
"Run Performance Test"
echoInfo
"Run Performance Test"
cd
$WORK_DIR
/TDengine/tests/pytest
cd
$WORK_DIR
/TDengine/tests/pytest
...
@@ -104,6 +107,7 @@ function sendReport {
...
@@ -104,6 +107,7 @@ function sendReport {
stopTaosd
stopTaosd
buildTDengine
buildTDengine
runQueryPerfTest
runQueryPerfTest
stopTaosd
echoInfo
"Send Report"
echoInfo
"Send Report"
sendReport
sendReport
...
...
tests/pytest/fulltest.sh
浏览文件 @
a586784c
...
@@ -66,7 +66,7 @@ python3 ./test.py -f tag_lite/int.py
...
@@ -66,7 +66,7 @@ python3 ./test.py -f tag_lite/int.py
python3 ./test.py
-f
tag_lite/set.py
python3 ./test.py
-f
tag_lite/set.py
python3 ./test.py
-f
tag_lite/smallint.py
python3 ./test.py
-f
tag_lite/smallint.py
python3 ./test.py
-f
tag_lite/tinyint.py
python3 ./test.py
-f
tag_lite/tinyint.py
python3 ./test.py
-f
tag_lite/alter_tag.py
#python3 ./test.py -f dbmgmt/database-name-boundary.py
#python3 ./test.py -f dbmgmt/database-name-boundary.py
python3 ./test.py
-f
import_merge/importBlock1HO.py
python3 ./test.py
-f
import_merge/importBlock1HO.py
...
...
tests/pytest/tag_lite/alter_tag.py
0 → 100644
浏览文件 @
a586784c
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
from
util.dnodes
import
tdDnodes
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
ts
=
1538548685000
def
run
(
self
):
tdSql
.
prepare
()
print
(
"==============step1"
)
tdSql
.
execute
(
"CREATE TABLE IF NOT EXISTS ampere (ts TIMESTAMP(8),ampere DOUBLE(8)) TAGS (device_name BINARY(50),build_id BINARY(50),project_id BINARY(50),alias BINARY(50))"
)
tdSql
.
execute
(
"insert into d1001 using ampere tags('test', '2', '2', '2') VALUES (now, 123)"
)
tdSql
.
execute
(
"ALTER TABLE ampere ADD TAG variable_id BINARY(50)"
)
print
(
"==============step2"
)
tdSql
.
execute
(
"insert into d1002 using ampere tags('test', '2', '2', '2', 'test') VALUES (now, 124)"
)
tdSql
.
query
(
"select * from ampere"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
6
,
None
)
tdSql
.
checkData
(
1
,
6
,
'test'
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录