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

Fix deprecated messages #822

Merged
merged 4 commits into from
Jul 15, 2019
Merged

Fix deprecated messages #822

merged 4 commits into from
Jul 15, 2019

Conversation

byronz
Copy link
Contributor

@byronz byronz commented Jul 15, 2019

@@ -39,7 +44,7 @@ def __init__(
self._download_path = download_path
self._wait_timeout = wait_timeout

self._driver = self.get_webdriver(remote)
self._driver = until(lambda: self.get_webdriver(remote), timeout=1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexcjohnson I change the hardcode 3x trial with the wait.until mechanism, I can try later on remove this and get more info from the logs for debugging

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, get_webdriver swallows the error. I suppose that's OK, but the other way has the advantage that if the error persists all the way to the end it's still raised as a regular exception. perhaps build this in (optionally) to until, or make a new until variant until_no_error?

@byronz byronz marked this pull request as ready for review July 15, 2019 14:20
raise
)
except WebDriverException:
logger.exception("<<<Webdriver not initialized correctly>>>")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexcjohnson but the logger.exception will record all the exceptions, so it's not swallowed by this function. It depends on how we configure pytest, so all the logs could be accessible in the circleci.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, and this has the advantage that you'll actually see all the exceptions - ie if it fails 5 times you'll see all 5 - and I guess the until will ensure that at the end of it all there at least is an exception. OK, let's do it.

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@byronz byronz merged commit eb32d88 into master Jul 15, 2019
@byronz byronz deleted the fix-deprecated-messages branch July 15, 2019 16:09
@alexcjohnson alexcjohnson mentioned this pull request Jul 17, 2019
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants