Skip to content

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

Open
chenyosef wants to merge 1 commit intomasterfrom
chen/add_logging_to_timeout
Open

Added debug message to log how much time passes before a predicate happens#4
chenyosef wants to merge 1 commit intomasterfrom
chen/add_logging_to_timeout

Conversation

@chenyosef
Copy link
Copy Markdown

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
Copy Markdown

@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

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

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