Skip to content

Commit 326db63

Browse files
committed
test: log sanity check assertion failures
1 parent f5525ad commit 326db63

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/functional/interface_usdt_utxocache.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,13 @@ def handle_utxocache_flush(_, data, __):
353353
"size": event.size
354354
})
355355
# sanity checks only
356-
assert event.memory > 0
357-
assert event.duration > 0
358-
handle_flush_succeeds += 1
356+
try:
357+
assert event.memory > 0
358+
assert event.duration > 0
359+
except AssertionError:
360+
self.log.exception("Assertion error")
361+
else:
362+
handle_flush_succeeds += 1
359363

360364
bpf["utxocache_flush"].open_perf_buffer(handle_utxocache_flush)
361365

0 commit comments

Comments
 (0)