Stack Trace
self = <test.integration.test_rawpixelsstore.TestRPS object at 0x7f317e9d0710>
tmpdir = local('/tmp/pytest-of-omero/pytest-6/testPyramidConcurrentAccess0')
def testPyramidConcurrentAccess(self, tmpdir):
"""
See ticket:11709
"""
all_context = {"omero.group": "-1"}
from omero.util import concurrency
pix = self.missing_pyramid()
rps = self.sf.createRawPixelsStore(all_context)
try:
# First execution should certainly fail
try:
rps.setPixelsId(int(pix), True, all_context)
assert False, "Should throw!"
except omero.MissingPyramidException as mpm:
assert int(pix) == mpm.pixelsID
# Eventually, however, it should be generated
i = 10
success = False
while i > 0 and not success:
try:
rps.setPixelsId(int(pix), True, all_context)
success = True
except omero.MissingPyramidException as mpm:
assert int(pix) == mpm.pixelsID
backOff = mpm.backOff / 1000
event = concurrency.get_event("testRomio")
event.wait(backOff) # seconds
i -= 1
> assert success
E assert False
test/integration/test_rawpixelsstore.py:185: AssertionError