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

Added debug message to log how much time passes before a predicate happens #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chenyosef
Copy link

This will help us to detect when test is timed out if it is an unusual timeout or if normally the timeout almost reached, thus need to be extended.
Do you see any harm with this ? is debug level good enough or should it be info ?

Copy link

@eranco74 eranco74 left a comment

Choose a reason for hiding this comment

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

Can be info

return
else:
time.sleep(interval)
except:
time.sleep(interval)
if predicate(* args, ** kwargs):
_successful_TS_ASSERT_Count += 1
logging.debug("Predicate %s succeed after timeout expired", predicate)
Copy link

Choose a reason for hiding this comment

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

Although it's true this log line will be confusing when going over the log (imply failure though counts as success).
Consider changing to:
Predicate %s succeeded just in timeout.

@chenyosef chenyosef force-pushed the chen/add_logging_to_timeout branch from 1b115ed to 20b89d5 Compare August 9, 2018 12:00
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.

3 participants