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

Lettuce YouTube Check Improvements #3949

Merged

Conversation

muhammad-ammar
Copy link
Contributor

No description provided.

@muhammad-ammar
Copy link
Contributor Author

@jzoldak @auraz @polesye Please Review.

try:
response = requests.get(url, allow_redirects=False)
except requests.exceptions.ConnectionError:
print "EXCEPTION: Connection timed out for {0}".format(url)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please clarify: Output of print will be seen both in Jenkins logs and local logs (on dev machine run)? Print is better than log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah print Output will be seen on console. Log is better then print as print will pollute the console. Is there any log files being written by lettuce tests?

Copy link
Contributor

Choose a reason for hiding this comment

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

They are should be, @jzoldak can you please clarify?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, our pattern is to use log not print.

We display on the console output log level warning and up.

To see what the console would look like when youtube is not available, you can temporarily change the status code that is returned to something that will fail and do something like rake test:acceptance:cms:fast["--tag requires_stub_youtube -s 1"]

Copy link
Contributor

Choose a reason for hiding this comment

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

LOGGER.warning("Connection Error. YouTube {0} service not available. Skipping this test.".format(name))

@polesye
Copy link
Contributor

polesye commented Jun 2, 2014

👍

@jzoldak
Copy link
Contributor

jzoldak commented Jun 2, 2014

👍

muhammad-ammar added a commit that referenced this pull request Jun 2, 2014
…ability-check

Lettuce YouTube Check Improvements
@muhammad-ammar muhammad-ammar merged commit ba673f8 into master Jun 2, 2014
@muhammad-ammar muhammad-ammar deleted the ammar/improve-lettuce-youtube-availability-check branch June 2, 2014 18:25
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.

4 participants