Merge pull request #15179 from taosdata/enh/crash_gen

Minor enhancement to crash_gen tool to display unexpected success tasks
This commit is contained in:
Minglei Jin 2022-07-21 10:48:19 +08:00 committed by GitHub
commit 4aa75d79c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -741,7 +741,10 @@ class AnyState:
sCnt += 1
if (sCnt >= 2):
raise CrashGenError(
"Unexpected more than 1 success with task: {}".format(cls))
"Unexpected more than 1 success with task: {}, in task set: {}".format(
cls.__name__, # verified just now that isinstance(task, cls)
[c.__class__.__name__ for c in tasks]
))
def assertIfExistThenSuccess(self, tasks, cls):
sCnt = 0