Merge pull request #22843 from taosdata/test/3.0/TD-26192
test: increase timeout 60s of replica 3to1
This commit is contained in:
commit
199aabdaae
|
@ -94,10 +94,10 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4
|
||||||
|
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreMnode.py -N 5 -M 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreMnode.py -N 5 -M 3 -i False
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreQnode.py -N 5 -M 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreQnode.py -N 5 -M 3 -i False
|
||||||
|
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/create_wrong_topic.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/dropDbR3ConflictTransaction.py -N 3
|
||||||
|
|
|
@ -52,8 +52,8 @@ class ConfigureyCluster:
|
||||||
dnode.addExtraCfg("secondEp", f"{hostname}:{startPort_sec}")
|
dnode.addExtraCfg("secondEp", f"{hostname}:{startPort_sec}")
|
||||||
|
|
||||||
# configure dnoe of independent mnodes
|
# configure dnoe of independent mnodes
|
||||||
if num <= self.mnodeNums and self.mnodeNums != 0 and independentMnode == "True" :
|
if num <= self.mnodeNums and self.mnodeNums != 0 and independentMnode == True :
|
||||||
tdLog.info("set mnode supportVnodes 0")
|
tdLog.info(f"set mnode:{num} supportVnodes 0")
|
||||||
dnode.addExtraCfg("supportVnodes", 0)
|
dnode.addExtraCfg("supportVnodes", 0)
|
||||||
# print(dnode)
|
# print(dnode)
|
||||||
self.dnodes.append(dnode)
|
self.dnodes.append(dnode)
|
||||||
|
|
|
@ -99,7 +99,7 @@ class TDTestCase:
|
||||||
tdSql.query(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 0);")
|
tdSql.query(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 0);")
|
||||||
tdSql.checkEqual(tdSql.queryResult[0][0], 0)
|
tdSql.checkEqual(tdSql.queryResult[0][0], 0)
|
||||||
tdSql.query(f"select to_unixtimestamp('1970-01-01 00:00:00', 1);")
|
tdSql.query(f"select to_unixtimestamp('1970-01-01 00:00:00', 1);")
|
||||||
tdSql.checkData(0, 0, '1970-01-01 00:00:00')
|
tdSql.checkData(0, 0, datetime.datetime(1970, 1, 1, 0, 0, 0))
|
||||||
tdSql.error(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 2);")
|
tdSql.error(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 2);")
|
||||||
tdSql.error(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 1.5);")
|
tdSql.error(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 1.5);")
|
||||||
tdSql.error(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 'abc');")
|
tdSql.error(f"select to_unixtimestamp('1970-01-01 08:00:00+08:00', 'abc');")
|
||||||
|
|
|
@ -245,9 +245,12 @@ class ClusterComCheck:
|
||||||
tdLog.exit(f"vgroup number of {db_name} is not correct")
|
tdLog.exit(f"vgroup number of {db_name} is not correct")
|
||||||
if self.db_replica == 1 :
|
if self.db_replica == 1 :
|
||||||
if tdSql.queryResult[0][4] == 'leader' and tdSql.queryResult[1][4] == 'leader' and tdSql.queryResult[last_number][4] == 'leader':
|
if tdSql.queryResult[0][4] == 'leader' and tdSql.queryResult[1][4] == 'leader' and tdSql.queryResult[last_number][4] == 'leader':
|
||||||
ready_time= (count + 1)
|
tdSql.query(f"select `replica` from information_schema.ins_databases where `name`='{db_name}';")
|
||||||
tdLog.success(f"all vgroups of {db_name} are leaders in {count + 1} s")
|
print("db replica :",tdSql.queryResult[0][0])
|
||||||
return True
|
if tdSql.queryResult[0][0] == db_replica:
|
||||||
|
ready_time= (count + 1)
|
||||||
|
tdLog.success(f"all vgroups with replica {self.db_replica} of {db_name} are leaders in {count + 1} s")
|
||||||
|
return True
|
||||||
count+=1
|
count+=1
|
||||||
elif self.db_replica == 3 :
|
elif self.db_replica == 3 :
|
||||||
vgroup_status_first=[tdSql.queryResult[0][4],tdSql.queryResult[0][6],tdSql.queryResult[0][8]]
|
vgroup_status_first=[tdSql.queryResult[0][4],tdSql.queryResult[0][6],tdSql.queryResult[0][8]]
|
||||||
|
@ -255,13 +258,16 @@ class ClusterComCheck:
|
||||||
vgroup_status_last=[tdSql.queryResult[last_number][4],tdSql.queryResult[last_number][6],tdSql.queryResult[last_number][8]]
|
vgroup_status_last=[tdSql.queryResult[last_number][4],tdSql.queryResult[last_number][6],tdSql.queryResult[last_number][8]]
|
||||||
if vgroup_status_first.count('leader') == 1 and vgroup_status_first.count('follower') == 2:
|
if vgroup_status_first.count('leader') == 1 and vgroup_status_first.count('follower') == 2:
|
||||||
if vgroup_status_last.count('leader') == 1 and vgroup_status_last.count('follower') == 2:
|
if vgroup_status_last.count('leader') == 1 and vgroup_status_last.count('follower') == 2:
|
||||||
ready_time= (count + 1)
|
tdSql.query(f"select `replica` from information_schema.ins_databases where `name`='{db_name}';")
|
||||||
tdLog.success(f"elections of {db_name}.vgroups are ready in {ready_time} s")
|
print("db replica :",tdSql.queryResult[0][0])
|
||||||
return True
|
if tdSql.queryResult[0][0] == db_replica:
|
||||||
|
ready_time= (count + 1)
|
||||||
|
tdLog.success(f"elections of {db_name}.vgroups with replica {self.db_replica} are ready in {ready_time} s")
|
||||||
|
return True
|
||||||
count+=1
|
count+=1
|
||||||
else:
|
else:
|
||||||
tdLog.debug(tdSql.queryResult)
|
tdLog.debug(tdSql.queryResult)
|
||||||
tdLog.notice(f"elections of {db_name} all vgroups are failed in {count} s ")
|
tdLog.notice(f"elections of {db_name} all vgroups with replica {self.db_replica} are failed in {count} s ")
|
||||||
caller = inspect.getframeinfo(inspect.stack()[1][0])
|
caller = inspect.getframeinfo(inspect.stack()[1][0])
|
||||||
args = (caller.filename, caller.lineno)
|
args = (caller.filename, caller.lineno)
|
||||||
tdLog.exit("%s(%d) failed " % args)
|
tdLog.exit("%s(%d) failed " % args)
|
||||||
|
|
|
@ -177,7 +177,7 @@ class TDTestCase:
|
||||||
tdSql.query("select count(*) from %s"%stableName)
|
tdSql.query("select count(*) from %s"%stableName)
|
||||||
tdSql.checkData(0,0,rowsPerStb)
|
tdSql.checkData(0,0,rowsPerStb)
|
||||||
|
|
||||||
clusterComCheck.check_vgroups_status(vgroup_numbers=paraDict["vgroups"],db_replica=replica1,db_name=paraDict["dbName"],count_number=40)
|
clusterComCheck.check_vgroups_status(vgroup_numbers=paraDict["vgroups"],db_replica=replica1,db_name=paraDict["dbName"],count_number=100)
|
||||||
sleep(5)
|
sleep(5)
|
||||||
tdLog.info(f"show transactions;alter database db0_0 replica {replica3};")
|
tdLog.info(f"show transactions;alter database db0_0 replica {replica3};")
|
||||||
TdSqlEx.execute(f'show transactions;')
|
TdSqlEx.execute(f'show transactions;')
|
||||||
|
|
Loading…
Reference in New Issue