test: log sanity check assertion failures

This commit is contained in:
stickies-v committed 2023-06-23 16:47:43 +01:00
1 parent f5525ad680
commit 326db63a68
1 file changed
+7 -3
+7 -3
View File
@@ -353,9 +353,13 @@ class UTXOCacheTracepointTest(BitcoinTestFramework):
"size": event.size
})
# sanity checks only
assert event.memory > 0
assert event.duration > 0
handle_flush_succeeds += 1
try:
assert event.memory > 0
assert event.duration > 0
except AssertionError:
self.log.exception("Assertion error")
else:
handle_flush_succeeds += 1
bpf["utxocache_flush"].open_perf_buffer(handle_utxocache_flush)