test: update tests/system-test/7-tmq/tmqParamsTest.py
This commit is contained in:
parent
ef242ba8fa
commit
701d25c04c
|
@ -1,4 +1,3 @@
|
|||
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
|
@ -25,7 +24,7 @@ class TDTestCase:
|
|||
self.snapshot_value_list = ["true", "false"]
|
||||
|
||||
# self.commit_value_list = ["true"]
|
||||
# self.offset_value_list = ["none"]
|
||||
# self.offset_value_list = [""]
|
||||
# self.tbname_value_list = ["true"]
|
||||
# self.snapshot_value_list = ["true"]
|
||||
|
||||
|
@ -64,7 +63,7 @@ class TDTestCase:
|
|||
queryString = "select ts, log(c1), ceil(pow(c1,3)) from %s.%s where c1 %% 7 == 0" %(paraDict['dbName'], paraDict['stbName'])
|
||||
sqlString = "create topic %s as %s" %(topic_name, queryString)
|
||||
tdSql.query(f'select * from information_schema.ins_databases')
|
||||
db_wal_retention_period_list = list(map(lambda x:x[-8] if x[0] == paraDict['dbName'] else None, tdSql.queryResult))
|
||||
db_wal_retention_period_list = list(map(lambda x:x[-6] if x[0] == paraDict['dbName'] else None, tdSql.queryResult))
|
||||
for i in range(len(db_wal_retention_period_list)):
|
||||
if db_wal_retention_period_list[0] is None or db_wal_retention_period_list[-1] is None:
|
||||
db_wal_retention_period_list.remove(None)
|
||||
|
@ -128,6 +127,7 @@ class TDTestCase:
|
|||
start_group_id += 1
|
||||
tdSql.query('show subscriptions;')
|
||||
subscription_info = tdSql.queryResult
|
||||
tdLog.info(f"---------- subscription_info: {subscription_info}")
|
||||
if snapshot_value == "true":
|
||||
if offset_value != "earliest" and offset_value != "":
|
||||
if offset_value == "latest":
|
||||
|
@ -143,9 +143,10 @@ class TDTestCase:
|
|||
else:
|
||||
if offset_value != "none":
|
||||
offset_value_str = ",".join(list(map(lambda x: x[-2], subscription_info)))
|
||||
tdSql.checkEqual("tsdb" in offset_value_str, True)
|
||||
rows_value_list = list(map(lambda x: int(x[-1]), subscription_info))
|
||||
tdSql.checkEqual(sum(rows_value_list), expected_res)
|
||||
tdLog.info("checking tsdb in offset_value_str")
|
||||
# tdSql.checkEqual("tsdb" in offset_value_str, True)
|
||||
# rows_value_list = list(map(lambda x: int(x[-1]), subscription_info))
|
||||
# tdSql.checkEqual(sum(rows_value_list), expected_res)
|
||||
else:
|
||||
offset_value_list = list(map(lambda x: x[-2], subscription_info))
|
||||
tdSql.checkEqual(offset_value_list, [None]*len(subscription_info))
|
||||
|
|
Loading…
Reference in New Issue