Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion tests/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def poll_until_condition(
fn: Callable[[], Awaitable[T] | T],
condition: Callable[[T], bool] = bool,
*,
timeout: float = 5,
timeout: float = 30,
poll_interval: float = 1,
backoff_factor: float = 1,
) -> T:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ async def all_locks_visible() -> bool:
assert isinstance(head, RequestQueueHead)
return locked_ids.isdisjoint(item.id for item in head.items)

await poll_until_condition(all_locks_visible, timeout=30, poll_interval=1)
await poll_until_condition(all_locks_visible)

# Unlock all requests
unlock_response = await maybe_await(rq_client.unlock_requests())
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ async def get_run() -> Run | None:
return await maybe_await(run_client.get())

await poll_until_condition(
get_run, lambda run: isinstance(run, Run) and run.status != 'READY', timeout=30, backoff_factor=2
get_run, lambda run: isinstance(run, Run) and run.status != 'READY', backoff_factor=2
)

# Metamorph the run into the same actor (allowed) with new input
Expand Down Expand Up @@ -339,7 +339,7 @@ async def get_run() -> Run | None:
return await maybe_await(run_client.get())

current_run = await poll_until_condition(
get_run, lambda run: isinstance(run, Run) and run.status != 'READY', timeout=30, backoff_factor=2
get_run, lambda run: isinstance(run, Run) and run.status != 'READY', backoff_factor=2
)

# Only try to reboot if the run is still running
Expand Down