Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions tests/e2e/test_actor_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ async def test_actor_push_data_charges_both_events(
"""Test that push_data charges both the explicit event and the synthetic apify-default-dataset-item event."""
run = await run_actor(ppe_push_data_actor)

# Refetch until the platform gets its act together
for is_last_attempt, _ in retry_counter(30):
# Use a longer retry window (120 attempts x 1 s) for synthetic events like `apify-default-dataset-item`:
# the platform computes them from dataset writes asynchronously, so they propagate more slowly than
# explicit charges (which are reflected immediately via the charge endpoint).
for is_last_attempt, _ in retry_counter(120):
await asyncio.sleep(1)
updated_run = await apify_client_async.run(run.id).get()
run = ActorRun.model_validate(updated_run)
Expand Down Expand Up @@ -200,8 +202,10 @@ async def test_actor_push_data_combined_budget_limit(
"""
run = await run_actor(ppe_push_data_actor, max_total_charge_usd=Decimal('0.20'))

# Refetch until the platform gets its act together
for is_last_attempt, _ in retry_counter(30):
# Use a longer retry window (120 attempts x 1 s) for synthetic events like `apify-default-dataset-item`:
# the platform computes them from dataset writes asynchronously, so they propagate more slowly than
# explicit charges (which are reflected immediately via the charge endpoint).
for is_last_attempt, _ in retry_counter(120):
await asyncio.sleep(1)
updated_run = await apify_client_async.run(run.id).get()
run = ActorRun.model_validate(updated_run)
Expand Down
Loading