Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase post launch redirect timeout #459

Merged
merged 1 commit into from
Jul 2, 2024
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
9 changes: 6 additions & 3 deletions grizzly/common/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
__credits__ = ["Tyson Smith"]

LOG = getLogger(__name__)
# time in seconds to wait for target to navigate away from post launch page
POST_LAUNCH_TIMEOUT = 600
# display warning if launch duration exceeds set value
SLOW_LAUNCH_THRESHOLD = 20

Expand Down Expand Up @@ -253,7 +255,7 @@ def post_launch(self, delay: int = 0) -> None:
"""Perform actions after launching browser before loading test cases.

Args:
post_launch_delay: Time in seconds before the target will continue.
delay: Time in seconds before the target will continue.

Returns:
None
Expand All @@ -272,10 +274,11 @@ def post_launch(self, delay: int = 0) -> None:
org_timeout = self._server.timeout
# add time buffer to redirect delay
# in practice this should take a few seconds (~10s)
# in extreme cases ~40s (slow build + debugger)
self._server.timeout = delay + 180
# in extreme cases ~180s (slow build + debugger + other settings)
self._server.timeout = delay + POST_LAUNCH_TIMEOUT
if delay > 0:
LOG.info("Browser launched, continuing in %ds...", delay)
LOG.debug("post launch timeout: %ds", self._server.timeout)
# serve prompt page
server_status, _ = self._server.serve_path(
content.root,
Expand Down
Loading