-
Notifications
You must be signed in to change notification settings - Fork 3.2k
add optional sample timeout to tox sample runner #17139
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
Conversation
|
Do these samples run forever by design? Should we change the samples instead since we don't want users to run for instance, an infinite loop. What is the behavior of these samples when a user runs the sample? |
|
@rakshith91 , the receiving forever sample is by design. as far as I know customers usually use eventhub/servicebus as part of a micro server application which constantly pumps and handles messages from the service, and that's why we have the push receiving design in eventhub and the service bus iterator mode (also push-based receiving). so I prefer to keeping most of the receiving sample as they are for customers to start with. but you have brought a good point and I looked into samples which don't necessarily has to be receiving forever and could be moved into normal section:
@swathipil , let's update the tickets #16705 #16642 to address those two. |
rakshith91
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yunhaoling thanks for the explanation.
LGTM
| if isinstance(timeout, tuple): | ||
| timeout, pass_if_timeout = timeout | ||
| else: | ||
| pass_if_timeout = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kristapratico , added the default here in order to not change the flow of the current code too much. Made both timeout and pass_if_timeout required params in run_check_call_with_timeout since it seems that there would be no reason both of those wouldn't be passed in. Does that seem reasonable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah just realized I can't approve my own PR. I'm ready to merge when you are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good!
No description provided.