Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a0260f18
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看板
提交
a0260f18
编写于
8月 31, 2021
作者:
J
jiajingbin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-6369]<test> modify some multi-threads testcases, changed some random sql to fixed sql
上级
8aa4274b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
16 deletion
+28
-16
tests/pytest/insert/schemalessInsert.py
tests/pytest/insert/schemalessInsert.py
+28
-16
未找到文件。
tests/pytest/insert/schemalessInsert.py
浏览文件 @
a0260f18
...
@@ -1133,24 +1133,23 @@ class TDTestCase:
...
@@ -1133,24 +1133,23 @@ class TDTestCase:
tdSql
.
checkRows
(
6
)
tdSql
.
checkRows
(
6
)
def
sStbDtbDdataAcMtInsertMultiThreadCheckCase
(
self
):
def
sStbDtbDdataAcMtInsertMultiThreadCheckCase
(
self
):
"""
#! concurrency conflict
"""
"""
"""
thread input same stb, different tb, different data, add col, mul tag
thread input same stb, different tb, different data, add col, mul tag
"""
"""
self
.
cleanStb
()
self
.
cleanStb
()
input_sql
,
stb_name
=
self
.
genFullTypeSql
()
input_sql
,
stb_name
=
self
.
genFullTypeSql
()
self
.
resCmp
(
input_sql
,
stb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
s_stb_d_tb_a_col_m_tag_list
=
self
.
genSqlList
(
stb_name
=
stb_name
)[
5
]
# s_stb_d_tb_a_col_m_tag_list = self.genSqlList(stb_name=stb_name)[5]
s_stb_d_tb_a_col_m_tag_list
=
[(
f
'
{
stb_name
}
,t0=F,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=t,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="ngxgzdzs",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=F 1626006833639000000ns'
,
'hpxbys'
),
\
(
f
'
{
stb_name
}
,t0=True,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=T,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="vvfrdtty",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=True 1626006833639000000ns'
,
'hpxbys'
),
\
(
f
'
{
stb_name
}
,t0=f,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=False,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="kzscucnt",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=f 1626006833639000000ns'
,
'hpxbys'
),
\
(
f
'
{
stb_name
}
,t0=false,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="asegdbqk",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=false 1626006833639000000ns'
,
'hpxbys'
),
\
(
f
'
{
stb_name
}
,t0=T,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=true,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="yvqnhgmn",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=T 1626006833639000000ns'
,
'hpxbys'
)]
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_d_tb_a_col_m_tag_list
))
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_d_tb_a_col_m_tag_list
))
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
def
sStbDtbDdataAtMcInsertMultiThreadCheckCase
(
self
):
def
sStbDtbDdataAtMcInsertMultiThreadCheckCase
(
self
):
"""
#! concurrency conflict
"""
"""
"""
thread input same stb, different tb, different data, add tag, mul col
thread input same stb, different tb, different data, add tag, mul col
"""
"""
...
@@ -1170,12 +1169,18 @@ class TDTestCase:
...
@@ -1170,12 +1169,18 @@ class TDTestCase:
tb_name
=
self
.
getLongName
(
7
,
"letters"
)
tb_name
=
self
.
getLongName
(
7
,
"letters"
)
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
tb_name
=
tb_name
)
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
tb_name
=
tb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
s_stb_s_tb_d_ts_list
=
self
.
genSqlList
(
stb_name
=
stb_name
,
tb_name
=
tb_name
)[
7
]
# s_stb_s_tb_d_ts_list = self.genSqlList(stb_name=stb_name, tb_name=tb_name)[7]
s_stb_s_tb_d_ts_list
=
[(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="tgqkvsws",t8=L"ncharTagValue" c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="htvnnldm",c8=L"ncharColValue",c9=7u64 0'
,
'sfzqdz'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=f,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="fvrhhqiy",t8=L"ncharTagValue" c0=False,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="gybqvhos",c8=L"ncharColValue",c9=7u64 0'
,
'sfzqdz'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=f,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="vifkabhu",t8=L"ncharTagValue" c0=t,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="zlvxgquy",c8=L"ncharColValue",c9=7u64 0'
,
'sfzqdz'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=True,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="lsyotcrn",t8=L"ncharTagValue" c0=False,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="oaupfgtz",c8=L"ncharColValue",c9=7u64 0'
,
'sfzqdz'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=T,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="jrwamcgy",t8=L"ncharTagValue" c0=F,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="vgzadjsh",c8=L"ncharColValue",c9=7u64 0'
,
'sfzqdz'
)]
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_s_tb_d_ts_list
))
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_s_tb_d_ts_list
))
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select * from
{
stb_name
}
"
)
# ! Small probability bug ---> temporarily delete it
tdSql
.
checkRows
(
6
)
# tdSql.query(f"select * from {stb_name}")
# tdSql.checkRows(6)
def
sStbStbDdataDtsAcMtInsertMultiThreadCheckCase
(
self
):
def
sStbStbDdataDtsAcMtInsertMultiThreadCheckCase
(
self
):
"""
"""
...
@@ -1204,7 +1209,12 @@ class TDTestCase:
...
@@ -1204,7 +1209,12 @@ class TDTestCase:
tb_name
=
self
.
getLongName
(
7
,
"letters"
)
tb_name
=
self
.
getLongName
(
7
,
"letters"
)
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
tb_name
=
tb_name
)
input_sql
,
stb_name
=
self
.
genFullTypeSql
(
tb_name
=
tb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
s_stb_s_tb_d_ts_a_tag_m_col_list
=
self
.
genSqlList
(
stb_name
=
stb_name
,
tb_name
=
tb_name
)[
9
]
# s_stb_s_tb_d_ts_a_tag_m_col_list = self.genSqlList(stb_name=stb_name, tb_name=tb_name)[9]
s_stb_s_tb_d_ts_a_tag_m_col_list
=
[(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=T,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="xsajdfjc",t8=L"ncharTagValue",t11=127i8,t10=L"ncharTagValue" c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64 0'
,
'rgqcfb'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="qzeyolgt",t8=L"ncharTagValue",t11=127i8,t10=L"ncharTagValue" c0=True,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64 0'
,
'rgqcfb'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=False,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="suxqziwh",t8=L"ncharTagValue",t11=127i8,t10=L"ncharTagValue" c0=False,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64 0'
,
'rgqcfb'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=false,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="vapolpgr",t8=L"ncharTagValue",t11=127i8,t10=L"ncharTagValue" c0=t,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64 0'
,
'rgqcfb'
),
\
(
f
'
{
stb_name
}
,id="
{
tb_name
}
",t0=F,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="eustwpfl",t8=L"ncharTagValue",t11=127i8,t10=L"ncharTagValue" c0=t,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64 0'
,
'rgqcfb'
)]
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_s_tb_d_ts_a_tag_m_col_list
))
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_s_tb_d_ts_a_tag_m_col_list
))
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
...
@@ -1230,16 +1240,18 @@ class TDTestCase:
...
@@ -1230,16 +1240,18 @@ class TDTestCase:
tdSql
.
checkRows
(
6
)
tdSql
.
checkRows
(
6
)
def
sStbDtbDdataDtsAcMtInsertMultiThreadCheckCase
(
self
):
def
sStbDtbDdataDtsAcMtInsertMultiThreadCheckCase
(
self
):
"""
# ! concurrency conflict
"""
"""
"""
thread input same stb, different tb, data, ts, add col, mul tag
thread input same stb, different tb, data, ts, add col, mul tag
"""
"""
self
.
cleanStb
()
self
.
cleanStb
()
input_sql
,
stb_name
=
self
.
genFullTypeSql
()
input_sql
,
stb_name
=
self
.
genFullTypeSql
()
self
.
resCmp
(
input_sql
,
stb_name
)
self
.
resCmp
(
input_sql
,
stb_name
)
s_stb_d_tb_d_ts_a_col_m_tag_list
=
self
.
genSqlList
(
stb_name
=
stb_name
)[
11
]
# s_stb_d_tb_d_ts_a_col_m_tag_list = self.genSqlList(stb_name=stb_name)[11]
s_stb_d_tb_d_ts_a_col_m_tag_list
=
[(
f
'
{
stb_name
}
,t0=True,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="eltflgpz",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=True 0'
,
'ynnlov'
),
\
(
f
'
{
stb_name
}
,t0=t,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=False,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="ysznggwl",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=t 0'
,
'ynnlov'
),
\
(
f
'
{
stb_name
}
,t0=f,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="nxwjucch",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=f 0'
,
'ynnlov'
),
\
(
f
'
{
stb_name
}
,t0=F,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=T,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="fzseicnt",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=F 0'
,
'ynnlov'
),
\
(
f
'
{
stb_name
}
,t0=False,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64 c0=F,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="zwgurhdp",c8=L"ncharColValue",c9=7u64,c11=L"ncharColValue",c10=False 0'
,
'ynnlov'
)]
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_d_tb_d_ts_a_col_m_tag_list
))
self
.
multiThreadRun
(
self
.
genMultiThreadSeq
(
s_stb_d_tb_d_ts_a_col_m_tag_list
))
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
query
(
f
"show tables;"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
...
@@ -1285,7 +1297,7 @@ class TDTestCase:
...
@@ -1285,7 +1297,7 @@ class TDTestCase:
self
.
tagColAddCheckCase
()
self
.
tagColAddCheckCase
()
self
.
tagMd5Check
()
self
.
tagMd5Check
()
self
.
tagColBinaryMaxLengthCheckCase
()
self
.
tagColBinaryMaxLengthCheckCase
()
#
self.tagColNcharMaxLengthCheckCase()
self
.
tagColNcharMaxLengthCheckCase
()
self
.
batchInsertCheckCase
()
self
.
batchInsertCheckCase
()
self
.
multiInsertCheckCase
(
1000
)
self
.
multiInsertCheckCase
(
1000
)
self
.
batchErrorInsertCheckCase
()
self
.
batchErrorInsertCheckCase
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录