ldaley / grails-remote-control

Facilitates executing commands (closures) against remote or local Grails applications
Apache License 2.0
23 stars 16 forks source link

Does not work in Grails V2.3.7? #15

Closed johnlim closed 10 years ago

johnlim commented 10 years ago

Hi,

I'm trying out the remote control plugin and have created a simple functional test as follows:

class SampleSpec extends GebSpec {

  def remote = new RemoteControl()

  def "sample specification"() {

    when:
    def id = remote {
      def field = new Field(label: "Remote Control", id: 0)
      field.save flush: true
      field.id
    }

    then:
    true

  }

However, I keep getting the following error when running my function tests using the remote control plugin groovyx.remote.RemoteControlException: Error sending command chain to 'http://localhost:8080null/grails-remote-control' at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:65) at groovyx.remote.client.RemoteControl.sendCommandChain(RemoteControl.groovy:114) at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:73) at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:67) at groovyx.remote.client.RemoteControl.call(RemoteControl.groovy:81)

I noticed that there were some open issues that looked similar and am wondering if the issue I am facing is a known issue? Is there any work around available? Thanks.

kensiprell commented 10 years ago

I don't have access to my code and tools at the moment, so I can't give a detailed answer, but I had the same problem. Try setting grails.project.fork.test to false in your BuildConfig.groovy.

grails.project.fork = [
    test: false,
    run: forkRunConfig,
    war: forkRunConfig,
    console: forkRunConfig
]
johnlim commented 10 years ago

Hi Ken,

Thanks! That worked for me. I assume this is a workaround and it will be fixed in subsequent releases?

Regards, John

On Mon, Apr 14, 2014 at 7:44 PM, Ken Siprell notifications@github.comwrote:

I don't have access to my code and tools at the moment, so I can't give a detailed answer, but I had the same problem. Try setting grails.project.fork.test to false in your BuildConfig.groovy.

grails.project.fork = [ test: false, run: forkRunConfig, war: forkRunConfig, console: forkRunConfig ]

— Reply to this email directly or view it on GitHubhttps://github.com/alkemist/grails-remote-control/issues/15#issuecomment-40357185 .

ldaley commented 10 years ago

This should be fixed in the next Grails release. The issue is on that side of things, and not with this plugin.

johnlim commented 10 years ago

Thanks. Closing this issue since it not related to the plugin.