Add an assertion for Async request status

This commit is contained in:
Dmitry Kurtaev 2019-04-29 08:12:13 +03:00
parent e8a626d43a
commit 61b928d9bd

View File

@ -209,8 +209,10 @@ class dnn_test(NewOpenCVTests):
outs.insert(0, netAsync.forwardAsync())
for i in reversed(range(numInputs)):
if outs[i].wait_for(timeout) == 1:
ret = outs[i].wait_for(timeout)
if ret == 1:
self.fail("Timeout")
self.assertEqual(ret, 0) # is ready
normAssert(self, refs[i], outs[i].get(), 'Index: %d' % i, 1e-10)