Task #6038 (closed)
Opened 13 years ago
Closed 13 years ago
Bug: Failing test testBatchCopy
Reported by: | wmoore | Owned by: | cblackburn |
---|---|---|---|
Priority: | major | Milestone: | OMERO-Beta4.3.2 |
Component: | OmeroPy | Version: | n.a. |
Keywords: | n.a. | Cc: | cneves |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2011-09-15 (5) |
Description
Turning this test back on
wjm:OmeroPy will$ python test/gatewaytest/rdefs.py RDefsTest.testBatchCopy E ====================================================================== ERROR: tests that we can copy rendering settings from one image to a set of targets ---------------------------------------------------------------------- Traceback (most recent call last): File "test/gatewaytest/rdefs.py", line 142, in testBatchCopy r = fakeRequest() NameError: global name 'fakeRequest' is not defined ---------------------------------------------------------------------- Ran 1 test in 45.986s FAILED (errors=1)
Change History (10)
comment:1 Changed 13 years ago by Will Moore <will@…>
comment:2 Changed 13 years ago by jburel
Referencing ticket #4329 has changed sprint.
comment:3 Changed 13 years ago by jburel
- Milestone changed from OMERO-Beta4.3.1 to OMERO-Beta4.3.2
comment:4 Changed 13 years ago by jmoore
- Cc cneves-x added
- Owner cneves-x deleted
Taking away from Carlos so someone else can pick up.
comment:5 Changed 13 years ago by cblackburn
- Owner set to cblackburn
comment:6 Changed 13 years ago by cblackburn
- Remaining Time set to 0.25
comment:7 Changed 13 years ago by cblackburn
- Sprint set to 2011-09-01 (4)
- Status changed from new to accepted
comment:8 Changed 13 years ago by cblackburn
- Remaining Time changed from 0.25 to 0.5
- Sprint changed from 2011-09-01 (4) to 2011-09-15 (5)
The method fakeRequest is not defined in or imported into this test module. However, it is defined in three other places. Tow of these implementations appear identical, the first listed below is different to the other two.
Macintosh-23:ome cblackburn$ git grep 'def fakeRequest' components/tools/OmeroWeb/omeroweb/webadmin/tests/request_factory.py:def fakeRequest (method, path="/", params={}, **kwargs): components/tools/OmeroWeb/omeroweb/webclient/tests/unittests.py:def fakeRequest (**kwargs): components/tools/OmeroWeb/omeroweb/webgateway/tests/unittests.py:def fakeRequest (**kwargs):
There is a case to be made for some refactoring in the various web-related tests in OmeroWeb and OmeroPy.
However, running this test locally it fails before this point so needs further investigation.
====================================================================== ERROR: tests that we can copy rendering settings from one image to a set of targets ---------------------------------------------------------------------- Traceback (most recent call last): File "gatewaytest/rdefs.py", line 32, in setUp self.channels = self.image.getChannels() File "/Users/cblackburn/Work/repos/ome/dist/lib/python/omero/gateway/__init__.py", line 5095, in wrapped if not self._prepareRenderingEngine() \ File "/Users/cblackburn/Work/repos/ome/dist/lib/python/omero/gateway/__init__.py", line 5287, in _prepareRenderingEngine self._re = self._prepareRE() File "/Users/cblackburn/Work/repos/ome/dist/lib/python/omero/gateway/__init__.py", line 5264, in _prepareRE re.resetDefaults() File "/Users/cblackburn/Work/repos/ome/dist/lib/python/omero/gateway/__init__.py", line 2956, in __call__ return self.handle_exception(e, *args, **kwargs) File "/Users/cblackburn/Work/repos/ome/dist/lib/python/omero/gateway/__init__.py", line 2953, in __call__ return self.f(*args, **kwargs) File "/Users/cblackburn/Work/repos/ome/dist/lib/python/omero_api_RenderingEngine_ice.py", line 409, in resetDefaults return _M_omero.api.RenderingEngine._op_resetDefaults.invoke(self, ((), _ctx)) ResourceError: exception ::omero::ResourceError { serverStackTrace = ome.conditions.ResourceError: Pixels set is missing statistics for channel '0'. This suggests an image import error or failed image import. ... serverExceptionClass = ome.conditions.ResourceError message = Pixels set is missing statistics for channel '0'. This suggests an image import error or failed image import. } ---------------------------------------------------------------------- Ran 1 test in 4.624s FAILED (errors=1)
(Trimming stacktrace, see comment below.)
comment:9 Changed 13 years ago by Colin Blackburn <C.Blackburn@…>
(In [fc6c47c9c6d403119126ae24599d95bc1eb96a10/ome.git] on branch develop) Re-disabling testBatchCopy, see #6038
comment:10 Changed 13 years ago by cblackburn
- Remaining Time changed from 0.5 to 0
- Resolution set to wontfix
- Status changed from accepted to closed
The ResourceError? above was due to a broken db. Cleaning the db allowed the test to fail as described in the ticket. Pasting in a copy of the fakeRequest method along with necessary imports allowed test to progress further. However, the test then fails at the line
rv = simplejson.loads(views.copy_image_rdef_json(r, CLIENT_BASE, _conn=self.gateway)._get_content())
due to views not being imported. If views is imported there is then a simplejson error.
I think this test needs to be rewritten at some stage.
(In [c3d42be8b475d171242220fbc64d74ac0655d385/ome.git] on branch develop) Turning back on gatewaytests. See #6037, #6038, #6039