Skip to content

Commit

Permalink
add a sanity check for number of transactions scraped from trx gen
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonCalabrese committed Feb 27, 2023
1 parent a13f48b commit 93f7a50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/performance_tests/performance_test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 93f7a50

Please sign in to comment.