58
58
assert_contains_log ,
59
59
async_mock_offchain_lookup_request_response ,
60
60
flaky_geth_dev_mining ,
61
+ flaky_with_xfail_on_exception ,
61
62
mock_offchain_lookup_request_response ,
62
63
)
63
64
from web3 ._utils .module_testing .utils import (
@@ -2359,10 +2360,9 @@ async def test_async_eth_replace_transaction_gas_price_too_low(
2359
2360
with pytest .raises (Web3ValueError ):
2360
2361
await async_w3 .eth .replace_transaction (txn_hash , txn_params )
2361
2362
2362
- @pytest .mark .xfail (
2363
- reason = "Very flaky on CI runs, hard to reproduce locally" ,
2364
- strict = False ,
2365
- raises = (RequestTimedOut , asyncio .TimeoutError , Web3ValueError ),
2363
+ @flaky_with_xfail_on_exception (
2364
+ reason = "Very flaky on CI runs, hard to reproduce locally." ,
2365
+ exception = RequestTimedOut ,
2366
2366
)
2367
2367
@pytest .mark .asyncio
2368
2368
async def test_async_eth_replace_transaction_gas_price_defaulting_minimum (
@@ -2387,10 +2387,9 @@ async def test_async_eth_replace_transaction_gas_price_defaulting_minimum(
2387
2387
gas_price * 1.125
2388
2388
) # minimum gas price
2389
2389
2390
- @pytest .mark .xfail (
2391
- reason = "Very flaky on CI runs, hard to reproduce locally" ,
2392
- strict = False ,
2393
- raises = (RequestTimedOut , asyncio .TimeoutError , Web3ValueError ),
2390
+ @flaky_with_xfail_on_exception (
2391
+ reason = "Very flaky on CI runs, hard to reproduce locally." ,
2392
+ exception = RequestTimedOut ,
2394
2393
)
2395
2394
@pytest .mark .asyncio
2396
2395
async def test_async_eth_replace_transaction_gas_price_defaulting_strategy_higher (
@@ -2420,10 +2419,9 @@ def higher_gas_price_strategy(async_w3: "AsyncWeb3", txn: TxParams) -> Wei:
2420
2419
) # Strategy provides higher gas price
2421
2420
async_w3 .eth .set_gas_price_strategy (None ) # reset strategy
2422
2421
2423
- @pytest .mark .xfail (
2424
- reason = "Very flaky on CI runs, hard to reproduce locally" ,
2425
- strict = False ,
2426
- raises = (RequestTimedOut , asyncio .TimeoutError , Web3ValueError ),
2422
+ @flaky_with_xfail_on_exception (
2423
+ reason = "Very flaky on CI runs, hard to reproduce locally." ,
2424
+ exception = RequestTimedOut ,
2427
2425
)
2428
2426
@pytest .mark .asyncio
2429
2427
async def test_async_eth_replace_transaction_gas_price_defaulting_strategy_lower (
0 commit comments