Skip to content

Commit

Permalink
test: reduce poll_interval during tests (#257)
Browse files Browse the repository at this point in the history
This speeds up the few action tests that run wait_until_finished.

Reduce time from ~5.8s to ~1.7s
  • Loading branch information
jooola committed Jul 24, 2023
1 parent 66f9163 commit c8253f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/unit/actions/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
class TestBoundAction:
@pytest.fixture()
def bound_running_action(self, mocked_requests):
action_client = ActionsClient(client=mocked_requests)
# Speed up tests that run `wait_until_finished`
action_client._client.poll_interval = 0.1

return BoundAction(
client=ActionsClient(client=mocked_requests),
client=action_client,
data=dict(id=14, status=Action.STATUS_RUNNING),
)

Expand Down

0 comments on commit c8253f3

Please sign in to comment.