Skip to content

Commit

Permalink
Fix test flakyness
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed Apr 11, 2024
1 parent e398ff3 commit 9cbd5d1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ private void assertTransactionsInCorrectBlocks(Web3j web3j, List<String> hashes,
protected SimpleStorage deploySimpleStorage() throws Exception {
final Web3j web3j = minerNode.nodeRequests().eth();
final Credentials credentials = Credentials.create(Accounts.GENESIS_ACCOUNT_ONE_PRIVATE_KEY);
TransactionManager txManager = new RawTransactionManager(web3j, credentials, CHAIN_ID);
TransactionManager txManager =
new RawTransactionManager(web3j, credentials, CHAIN_ID, createReceiptProcessor(web3j));

final RemoteCall<SimpleStorage> deploy =
SimpleStorage.deploy(web3j, txManager, new DefaultGasProvider());
Expand Down Expand Up @@ -206,8 +207,8 @@ protected List<Map<String, String>> getTxPoolContent() {
private TransactionReceiptProcessor createReceiptProcessor(Web3j web3j) {
return new PollingTransactionReceiptProcessor(
web3j,
TransactionManager.DEFAULT_POLLING_FREQUENCY,
TransactionManager.DEFAULT_POLLING_ATTEMPTS_PER_TX_HASH);
Math.max(1000, LINEA_CLIQUE_OPTIONS.blockPeriodSeconds() * 1000 / 5),
LINEA_CLIQUE_OPTIONS.blockPeriodSeconds() * 3);
}

protected String sendTransactionWithGivenLengthPayload(
Expand Down

0 comments on commit 9cbd5d1

Please sign in to comment.