Skip to content

Commit

Permalink
Increase delay and retries in account tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samtin0x committed Jun 24, 2024
1 parent 4a358b7 commit e576b0c
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_subaccounts(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccounts(test_address)
subaccounts = response["subaccounts"]
Expand All @@ -17,7 +17,7 @@ async def test_subaccounts(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_subaccount_0(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount(test_address, 0)
subaccount = response["subaccount"]
Expand All @@ -27,7 +27,7 @@ async def test_subaccount_0(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_asset_positions(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount_asset_positions(
test_address, 0
Expand All @@ -41,7 +41,7 @@ async def test_asset_positions(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_perpetual_positions(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount_perpetual_positions(
test_address, 0
Expand All @@ -55,7 +55,7 @@ async def test_perpetual_positions(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_transfers(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount_transfers(
test_address, 0
Expand All @@ -69,7 +69,7 @@ async def test_transfers(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_orders(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount_orders(test_address, 0)
assert response is not None
Expand All @@ -81,7 +81,7 @@ async def test_orders(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_fills(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount_fills(test_address, 0)
assert response is not None
Expand All @@ -93,7 +93,7 @@ async def test_fills(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_historical_pnl(indexer_rest_client, test_address):
response = await indexer_rest_client.account.get_subaccount_historical_pnls(
test_address, 0
Expand All @@ -107,7 +107,7 @@ async def test_historical_pnl(indexer_rest_client, test_address):


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_historical_block_trading_rewards(indexer_rest_client, test_address):
limit = 10
response = await indexer_rest_client.account.get_historical_block_trading_rewards(
Expand All @@ -124,7 +124,7 @@ async def test_historical_block_trading_rewards(indexer_rest_client, test_addres


@pytest.mark.asyncio
@retry_on_forbidden(max_retries=3, delay=1)
@retry_on_forbidden(max_retries=5, delay=3)
async def test_historical_trading_rewards_aggregated(indexer_rest_client, test_address):
period = TradingRewardAggregationPeriod.DAILY
limit = 10
Expand Down

0 comments on commit e576b0c

Please sign in to comment.