Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b6280cee
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
b6280cee
编写于
8月 06, 2021
作者:
J
jiajingbin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5816]<test>: add testcase alter/alterColMultiTimes.py for TD-5816
fix a small-probability bug for insert/schemalessInsert.py
上级
1d881042
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
69 addition
and
1 deletion
+69
-1
tests/pytest/alter/alterColMultiTimes.py
tests/pytest/alter/alterColMultiTimes.py
+67
-0
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-0
tests/pytest/insert/schemalessInsert.py
tests/pytest/insert/schemalessInsert.py
+1
-1
未找到文件。
tests/pytest/alter/alterColMultiTimes.py
0 → 100644
浏览文件 @
b6280cee
###################################################################
# 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
random
import
string
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
genColList
(
self
):
'''
generate column list
'''
col_list
=
list
()
for
i
in
range
(
1
,
18
):
col_list
.
append
(
f
'c
{
i
}
'
)
return
col_list
def
genIncreaseValue
(
self
,
input_value
):
'''
add ', 1' to end of value every loop
'''
value_list
=
list
(
input_value
)
value_list
.
insert
(
-
1
,
", 1"
)
return
''
.
join
(
value_list
)
def
insertAlter
(
self
):
'''
after each alter and insert, when execute 'select * from {tbname};' taosd will coredump
'''
tbname
=
''
.
join
(
random
.
choice
(
string
.
ascii_letters
.
lower
())
for
i
in
range
(
7
))
input_value
=
'(now, 1)'
tdSql
.
execute
(
f
'create table
{
tbname
}
(ts timestamp, c0 int);'
)
tdSql
.
execute
(
f
'insert into
{
tbname
}
values
{
input_value
}
;'
)
for
col
in
self
.
genColList
():
input_value
=
self
.
genIncreaseValue
(
input_value
)
tdSql
.
execute
(
f
'alter table
{
tbname
}
add column
{
col
}
int;'
)
tdSql
.
execute
(
f
'insert into
{
tbname
}
values
{
input_value
}
;'
)
tdSql
.
query
(
f
'select * from
{
tbname
}
;'
)
tdSql
.
checkRows
(
18
)
def
run
(
self
):
tdSql
.
prepare
()
self
.
insertAlter
()
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/fulltest.sh
浏览文件 @
b6280cee
...
...
@@ -380,6 +380,7 @@ python3 ./test.py -f query/querySession.py
python3 test.py
-f
alter/alter_create_exception.py
python3 ./test.py
-f
insert/flushwhiledrop.py
python3 ./test.py
-f
insert/schemalessInsert.py
python3 ./test.py
-f
alter/alterColMultiTimes.py
#======================p4-end===============
python3 test.py
-f
tools/taosdemoAllTest/pytest.py
...
...
tests/pytest/insert/schemalessInsert.py
浏览文件 @
b6280cee
...
...
@@ -705,7 +705,7 @@ class TDTestCase:
case no id when stb exist
"""
self
.
cleanStb
()
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
t0
=
"f"
,
c0
=
"f"
)
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
t
b_name
=
"sub_table_0123456"
,
t
0
=
"f"
,
c0
=
"f"
)
self
.
resCmp
(
input_sql
,
stb_name
)
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
stb_name
=
stb_name
,
id_noexist_tag
=
True
,
t0
=
"f"
,
c0
=
"f"
)
self
.
resCmp
(
input_sql
,
stb_name
,
condition
=
'where tbname like "t_%"'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录