self = <test.integration.test_cmdcallback.TestCmdCallback object at 0x7f4735d921d0>
def testTimingFinishesOnLoop(self):
cb = self.timing(25, 4 * 10) # Runs 1 second
> cb.loop(3, 500)
test/integration/test_cmdcallback.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = object #0 (::omero::cmd::CmdCallback)
{
}, loops = 3, ms = 500
def loop(self, loops, ms):
"""
Calls block(long) "loops" number of times with the "ms"
argument. This means the total wait time for the delete to occur
is: loops X ms. Sensible values might be 10 loops for 500 ms, or
5 seconds.
@param loops Number of times to call block(long)
@param ms Number of milliseconds to pass to block(long
@throws omero.LockTimeout if block(long) does not return
a non-null value after loops calls.
"""
count = 0
found = False
while count < loops:
count += 1
found = self.block(ms)
if found:
break
if found:
return self.getResponse()
else:
waited = (ms / 1000.0) * loops
> raise omero.LockTimeout(
None, None, "Command unfinished after %s seconds" % waited,
5000, int(waited))
E omero.LockTimeout: exception ::omero::LockTimeout
E {
E serverStackTrace = None
E serverExceptionClass = None
E message = Command unfinished after 1.5 seconds
E backOff = 5000
E seconds = 1
E }
../../../../.venv3/lib64/python3.11/site-packages/omero/callbacks.py:258: LockTimeout