Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Move assert statements out of
run_smoke_test
and into the actual test (for graceful shutdown in case of failure) #318Move assert statements out of
run_smoke_test
and into the actual test (for graceful shutdown in case of failure) #318Changes from 21 commits
2046b24
a65329c
8dfe3a7
a2490f1
aead025
e8e6d5e
a2cdef1
4b8ebc9
2635e79
f898bc7
6399c72
6eee21b
32ef5b1
f166d74
157e18b
c527c05
8962e33
94ab853
69afc0b
c095753
810dd30
ab8d3a7
f6d3cea
01fdbd2
643ed0d
791ca2d
9a5b0e1
6d2ea4a
d61fc5c
1e9b944
5c5576c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This now returns
server_errors
andclient_errors
to the caller.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.
In order to remove these
assert
statements in way that has me not doing any dangerous Boolean algebra, I employ the following pattern. We can change this if we want...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.
Tbh, I am not sure if I like the name
SmokeTestAssertError
it makes me feel like its asserting on a good output against an expected value.I think these are probably better as
SmokeTestExecutionError
? I was just following our naming with [ASSERT ERROR] but I think this convention is confusing.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.
I'm good with either. I'll leave it to you to decide 😂
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.
I'm lazy now. I'm going to leave it as is lol.
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.
I cleaned this up, but note that we weren't actually giving this "inner task" a smaller timeout.
Instead I outsource this logic to a contained method
get_output_from_stdout()
which reads the stream until completion. This whole process of reading from the stream is what I assign a timeout for. (No more need for manual computationelapsed_time = datetime.datetime.now() - start_time
if timeout was reached)