Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3139

StubFor: No more calls to 'openConnection' expected at this point. End of demands

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6-beta-2
    • 1.6-rc-2, 1.7-beta-1
    • mocks and stubs
    • None
    • Groovy 1.6 beta1 and Beta 2

    Description

      I am having troubles with Stub for in Groovy 1.6 Betas. I am attaching a short self contained Test that illustrates the problem. The same script runs fine in 1.5.6

      No more calls to 'openConnection' expected at this point. End of demands.

      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:70)
      at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:64)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:69)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200)
      at groovy.mock.interceptor.LooseExpectation.isEligible(LooseExpectation.groovy:56)
      at groovy.mock.interceptor.LooseExpectation$isEligible.callCurrent(Unknown Source)
      at groovy.mock.interceptor.LooseExpectation.match(LooseExpectation.groovy:45)
      at groovy.mock.interceptor.LooseExpectation$match.call(Unknown Source)
      at groovy.mock.interceptor.MockInterceptor.beforeInvoke(MockInterceptor.groovy:30)
      at groovy.mock.interceptor.MockProxyMetaClass.invokeMethod(MockProxyMetaClass.java:52)
      at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:34)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
      at Get2.getText(StubTests2.groovy:39)

      Attachments

        1. StubTests2.groovy
          0.8 kB
          Jim Shingler
        2. 3139_v16x.diff
          1 kB
          Roshan Dawrani

        Activity

          People

            roshandawrani Roshan Dawrani
            jshingler Jim Shingler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: