-
Notifications
You must be signed in to change notification settings - Fork 106
join threads on tests #592
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
tests/flow/tests_dag.py
Outdated
@@ -771,6 +771,7 @@ def run(): | |||
# assert that result tensor exists | |||
ret = con.execute_command("EXISTS {}".format(result_tensor_keyname)) | |||
env.assertEqual(ret, 1) | |||
t.join() |
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.
Don't you want to join even before(line 763)? Is there a way to verify that batching actually occurred?
tests/flow/tests_onnx.py
Outdated
@@ -229,6 +229,7 @@ def run(): | |||
argmax = max(range(len(values)), key=lambda i: values[i]) | |||
|
|||
env.assertEqual(argmax, 1) | |||
t.join() |
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.
Same question here
@@ -284,6 +284,7 @@ def run(): | |||
exception = e | |||
env.assertEqual(type(exception), redis.exceptions.ResponseError) | |||
env.assertEqual("Model did not generate the expected batch size", exception.__str__()) | |||
t.join() |
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 would add "env.assertTrue(False)" after lines 274 and 282, otherwise the test doesn't guarantee that those exceptions were raised...
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.
ret = con.execute_command('AI.MODELRUN', 'm{1}', 'INPUTS', 'd{1}', 'e{1}', 'OUTPUTS', 'f1{1}', 'f2{1}')
env.assertEqual(ret, b'OK')
as a single call might succeed, depends on the threads timing
Codecov Report
@@ Coverage Diff @@
## master #592 +/- ##
=======================================
Coverage 74.33% 74.33%
=======================================
Files 39 39
Lines 6062 6062
=======================================
Hits 4506 4506
Misses 1556 1556 Continue to review full report at Codecov.
|
No description provided.