Merge pull request #23239 from taosdata/case/TD-26678-3.0

case: split vgroups case add more info
This commit is contained in:
Alex Duan 2023-10-12 07:41:21 -05:00 committed by GitHub
commit b3e8d0691a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 6 deletions

View File

@ -43,7 +43,7 @@
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 1,
"start_timestamp": "now",
"start_timestamp": 1641976781440,
"sample_file": "./5-taos-tools/taosbenchmark/csv/sample_use_ts.csv",
"use_sample_ts": "yes",
"tags_file": "./5-taos-tools/taosbenchmark/csv/sample_tags.csv",

View File

@ -223,7 +223,7 @@ class TDTestCase:
start1 = time.time()
rows1 = tdSql.query(sql1)
spend1 = time.time() - start1
res1 = copy.copy(tdSql.queryResult)
res1 = copy.deepcopy(tdSql.queryResult)
sql2 = sql.replace('@db_name', self.db2)
tdLog.info(sql2)
@ -234,6 +234,7 @@ class TDTestCase:
rowlen1 = len(res1)
rowlen2 = len(res2)
errCnt = 0
if rowlen1 != rowlen2:
tdLog.exit(f"both row count not equal. rowlen1={rowlen1} rowlen2={rowlen2} ")
@ -249,8 +250,11 @@ class TDTestCase:
return False
for j in range(collen1):
if row1[j] != row2[j]:
tdLog.exit(f"both col not equal. row={i} col={j} col1={row1[j]} col2={row2[j]} .")
return False
tdLog.info(f"error both column value not equal. row={i} col={j} col1={row1[j]} col2={row2[j]} .")
errCnt += 1
if errCnt > 0:
tdLog.exit(f" db2 column value different with db2. different count ={errCnt} ")
# warning performance
diff = (spend2 - spend1)*100/spend1
@ -409,6 +413,9 @@ class TDTestCase:
# prepare env
self.prepareEnv()
tdLog.info("check db1 and db2 same after creating ...")
self.checkResult()
for i in range(3):
# split vgroup on db2
start = time.time()

View File

@ -233,6 +233,7 @@ class TDTestCase:
rowlen1 = len(res1)
rowlen2 = len(res2)
errCnt = 0
if rowlen1 != rowlen2:
tdLog.exit(f"both row count not equal. rowlen1={rowlen1} rowlen2={rowlen2} ")
@ -248,8 +249,11 @@ class TDTestCase:
return False
for j in range(collen1):
if row1[j] != row2[j]:
tdLog.exit(f"both col not equal. row={i} col={j} col1={row1[j]} col2={row2[j]} .")
return False
tdLog.info(f"error both column value not equal. row={i} col={j} col1={row1[j]} col2={row2[j]} .")
errCnt += 1
if errCnt > 0:
tdLog.exit(f" db2 column value different with db2. different count ={errCnt} ")
# warning performance
diff = (spend2 - spend1)*100/spend1