Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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@…>

(In [c3d42be8b475d171242220fbc64d74ac0655d385/ome.git] on branch develop) Turning back on gatewaytests. See #6037, #6038, #6039

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.
	at omeis.providers.re.metadata.StatsFactory.computeLocationStats(StatsFactory.java:259)
	at ome.logic.RenderingSettingsImpl.computeLocationStats(RenderingSettingsImpl.java:883)
	at ome.logic.RenderingSettingsImpl.resetChannelBindings(RenderingSettingsImpl.java:814)
	at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:573)
	at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:489)
	at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:1306)
	at ome.services.RenderingBean$13.doWork(RenderingBean.java:1891)
	at sun.reflect.GeneratedMethodAccessor276.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:440)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.security.basic.EventHandler.invoke(EventHandler.java:150)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:231)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy64.doWork(Unknown Source)
	at ome.services.util.Executor$Impl.execute(Executor.java:371)
	at ome.services.RenderingBean._resetDefaults(RenderingBean.java:1888)
	at ome.services.RenderingBean.resetDefaults(RenderingBean.java:681)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy80.resetDefaults(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:83)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy80.resetDefaults(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
	at ome.services.throttling.Callback.run(Callback.java:56)
	at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
	at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:136)
	at ome.services.blitz.impl.RenderingEngineI.resetDefaults_async(RenderingEngineI.java:376)
	at omero.api._RenderingEngineTie.resetDefaults_async(_RenderingEngineTie.java:323)
	at omero.api._RenderingEngineDisp.___resetDefaults(_RenderingEngineDisp.java:1328)
	at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:1704)
	at IceInternal.Incoming.invoke(Incoming.java:159)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
	at Ice.ConnectionI.message(ConnectionI.java:972)
	at IceInternal.ThreadPool.run(ThreadPool.java:577)
	at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)

    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)
Version 0, edited 13 years ago by cblackburn (next)

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.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.69567 sec.)

We're Hiring!