Merge pull request #21458 from taosdata/test/update_crash_gen

skip some errors
This commit is contained in:
Hui Li 2023-05-24 19:50:16 +08:00 committed by GitHub
commit 7f9b1ea59d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 10 deletions

View File

@ -2043,18 +2043,19 @@ class TdSuperTable:
for topic in current_topic_list:
topic_list.append(topic)
consumer.subscribe(topic_list)
# consumer with random work life
time_start = time.time()
while 1:
res = consumer.poll(1)
consumer.commit(res)
if time.time() - time_start > random.randint(5, 50):
break
try:
consumer.subscribe(topic_list)
# consumer with random work life
time_start = time.time()
while 1:
res = consumer.poll(1)
consumer.commit(res)
if time.time() - time_start > random.randint(5, 50):
break
consumer.unsubscribe()
except TmqError as e:
consumer.close()
except TmqError as err: # topic deleted by other threads
pass
return