From 93f7a50d1f060267225a76f681d5f1758d322818 Mon Sep 17 00:00:00 2001 From: Clayton Calabrese Date: Mon, 27 Feb 2023 11:57:59 -0600 Subject: [PATCH] add a sanity check for number of transactions scraped from trx gen --- tests/performance_tests/performance_test_basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/performance_tests/performance_test_basic.py b/tests/performance_tests/performance_test_basic.py index 42eb222913..cae8365076 100755 --- a/tests/performance_tests/performance_test_basic.py +++ b/tests/performance_tests/performance_test_basic.py @@ -390,6 +390,8 @@ def runTpsTest(self) -> PtbTpsTestResult: # Get stats after transaction generation stops trxSent = {} log_reader.scrapeTrxGenTrxSentDataLogs(trxSent, self.trxGenLogDirPath, self.ptbConfig.quiet) + if len(trxSent) != self.ptbConfig.expectedTransactionsSent: + print(f"ERROR: Transactions generated: {len(trxSent)} does not match the expected number of transactions: {self.ptbConfig.expectedTransactionsSent}") blocksToWait = 2 * self.ptbConfig.testTrxGenDurationSec + 10 trxSent = self.validationNode.waitForTransactionsInBlockRange(trxSent, self.data.startBlock, blocksToWait) self.data.ceaseBlock = self.validationNode.getHeadBlockNum()