History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-1723
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Blocker Blocker
Assignee: Graeme Rocher
Reporter: Marc Palmer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

Groovy mocks failing in tests in 1.0-RC2

Created: 19/Oct/07 12:03 PM   Updated: 24/Oct/07 05:16 PM
Component/s: None
Affects Version/s: 1.0-RC2
Fix Version/s: 1.0-RC2

Time Tracking:
Not Specified


 Description  « Hide
I tried to run existing unit tests in RC2 an mocks are failing saying there's an unexpected call to isInstance everywhere. Where is this coming from, its not in the tests? I imagine this is a groovy problem but I'm not sure.

Partial trace....

<failure message="No more calls to 'isInstance' expected at this point. End of demands." type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: No more calls to 'isInstance' expected at this point. End of demands.
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:465)
at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2086)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1022)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:952)
at groovy.lang.ExpandoMetaClass.invokeConstructor(ExpandoMetaClass.java:521)
at org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:126)
at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:103)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:233)
at groovy.mock.interceptor.LooseExpectation.isEligible(LooseExpectation.groovy:56)
at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(CachedMethod.java:107)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:127)
at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMethod.java:18)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:538)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:749)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:945)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:66)
at groovy.mock.interceptor.LooseExpectation.match(LooseExpectation.groovy:45)
at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(CachedMethod.java:107)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:127)
at org.codehaus.groovy.runtime.metaclass.StdMetaMethod.invoke(StdMetaMethod.java:18)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:538)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:749)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:945)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:589)
at org.codehaus.groovy.runtime.Invoker.invokePogoMethod(Invoker.java:98)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:79)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:74)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
at groovy.mock.interceptor.MockInterceptor.beforeInvoke(MockInterceptor.groovy:30)
at groovy.mock.interceptor.MockProxyMetaClass.invokeStaticMethod(MockProxyMetaClass.java:59)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:69)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:74)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
at org.codehaus.groovy.grails.plugins.web.ControllersGrailsPlugin$_closure4_closure85.doCall(ControllersGrailsPlugin.groovy:511)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marc Palmer - 24/Oct/07 05:16 PM
Seems OK for now