Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f3147f20
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
f3147f20
编写于
7月 25, 2022
作者:
C
cpwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix case
上级
592041c6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
34 deletion
+21
-34
tests/system-test/1-insert/mutil_stage.py
tests/system-test/1-insert/mutil_stage.py
+21
-34
未找到文件。
tests/system-test/1-insert/mutil_stage.py
浏览文件 @
f3147f20
import
datetime
from
dataclasses
import
dataclass
,
field
from
typing
import
List
,
Any
,
Tuple
from
util.log
import
*
from
util.sql
import
*
from
util.cases
import
*
from
util.dnodes
import
*
from
util.common
import
*
PRIMARY_COL
=
"ts"
...
...
@@ -54,24 +54,6 @@ DATA_PRE0 = f"data0"
DATA_PRE1
=
f
"data1"
DATA_PRE2
=
f
"data2"
@
dataclass
class
DataSet
:
ts_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
int_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
bint_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
sint_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
tint_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
int_un_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
bint_un_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
sint_un_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
tint_un_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
float_data
:
List
[
float
]
=
field
(
default_factory
=
list
)
double_data
:
List
[
float
]
=
field
(
default_factory
=
list
)
bool_data
:
List
[
int
]
=
field
(
default_factory
=
list
)
binary_data
:
List
[
str
]
=
field
(
default_factory
=
list
)
nchar_data
:
List
[
str
]
=
field
(
default_factory
=
list
)
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
...
...
@@ -126,9 +108,9 @@ class TDTestCase:
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE2
}
2
{
L2
}
{
NON_PRIMARY_DIR
}
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE2
}
2
{
L1
}
{
NON_PRIMARY_DIR
}
"
]
err_case5
=
[]
for
i
in
range
(
1
7
):
err_case5
.
append
(
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}{
i
}
{
L0
}
{
NON_PRIMARY_DIR
}
"
)
err_case5
=
[
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0
{
L0
}
{
PRIMARY_DIR
}
"
]
for
i
in
range
(
1
6
):
err_case5
.
append
(
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}{
i
+
1
}
{
L0
}
{
NON_PRIMARY_DIR
}
"
)
err_case6
=
[
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0
{
L0
}
{
PRIMARY_DIR
}
"
,
...
...
@@ -161,19 +143,15 @@ class TDTestCase:
def
__current_cfg
(
self
):
cfg_list
=
[]
current_case1
=
[
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0
{
L0
}
{
PRIMARY_
COL
}
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
1
{
L0
}
0
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE1
}
1
{
L1
}
0
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE2
}
2
{
L2
}
0
"
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0
{
L0
}
{
PRIMARY_
DIR
}
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
1
{
L0
}
{
NON_PRIMARY_DIR
}
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE1
}
1
{
L1
}
{
NON_PRIMARY_DIR
}
"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE2
}
2
{
L2
}
{
NON_PRIMARY_DIR
}
"
]
current_case2
=
[
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0 0 1"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
1 0 1"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0 0 1"
,
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0 0 1"
,
]
current_case2
=
[
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}
0
{
L0
}
{
PRIMARY_DIR
}
"
]
for
i
in
range
(
9
):
current_case2
.
append
(
f
"dataDir
{
self
.
taos_data_dir
}
/
{
DATA_PRE0
}{
i
+
1
}
{
L0
}
{
NON_PRIMARY_DIR
}
"
)
cfg_list
.
append
(
current_case1
)
...
...
@@ -181,7 +159,7 @@ class TDTestCase:
def
cfg_check
(
self
):
for
cfg_case
in
self
.
__err_cfg
:
tdLog
.
info
(
"---------"
,
self
.
__err_cfg
.
index
(
cfg_case
))
tdLog
.
info
(
self
.
__err_cfg
.
index
(
cfg_case
))
self
.
del_old_datadir
(
filename
=
self
.
taos_cfg_path
)
tdDnodes
.
stop
(
1
)
self
.
cfg_str_list
(
filename
=
self
.
taos_cfg_path
,
update_list
=
cfg_case
)
...
...
@@ -189,6 +167,15 @@ class TDTestCase:
tdSql
.
error
(
f
"show databases"
)
for
cfg_case
in
self
.
__current_cfg
:
self
.
del_old_datadir
(
filename
=
self
.
taos_cfg_path
)
tdDnodes
.
stop
(
1
)
self
.
cfg_str_list
(
filename
=
self
.
taos_cfg_path
,
update_list
=
cfg_case
)
tdDnodes
.
starttaosd
(
1
)
tdSql
.
query
(
f
"show databases"
)
def
run
(
self
):
self
.
cfg_check
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录