Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase connection timeout if remote_debug=true. #339

Closed

Conversation

beskow
Copy link

@beskow beskow commented Sep 24, 2013

Increase connection timeout if remote_debug=true, in order to give the remote debugger enough time to properly connect.

…e remote debugger enough time to properly connect.
@beskow
Copy link
Author

beskow commented Sep 26, 2013

We experience a minor inconvenience when remote-debugging fixture code (SLIM-based). We use the standard mechanism for executing tests (as described in http://fitnesse.org/FitNesse.UserGuide.DebugingFixtureCode). When connecting the remote debugger within Eclipse to the executing Fixture code, the FitNesse SLIM runner frequently reaches a timeout before the Eclipse debugger has established a connection. Googling for a solution, I only found some old postings from 2009 mentioning the same problem, but claimed it was Mac specific. Btw, I also run on a Mac, but I have observed the same behavior on one of my collegue's windows laptop.

Looking in the source code, I can see that the SlimCommandRunningClient.connect() method that has a timeout of 50 ms and a retry count of 100, which means that FitNesse/SLIM will timeout after 50*100 ms = 5 seconds. That is probably reasonable for a normal test run, but a bit too quick when running a test with remote debugging enabled.

It was a trivial change to increase the timeout to e.g. 250 ms * 100 retries = 25 seconds (conditionally of course, if remote_debug = true).

@amolenaar
Copy link
Collaborator

I don't like the fact that this is handled by a boolean. In the timeouts are still fixed values. I think a more elegant solution is possible.

@beskow
Copy link
Author

beskow commented Oct 5, 2013

Hi Arjan,

I completely agree that the hard-coded timeouts are ugly. Isn't the debug setting kind of boolean, though: either you run your tests in remote debug mode, or you don't. In debug mode, a short timeout doesn't really make sense.

Do you think configurable timeouts would be a better solution?

@amolenaar
Copy link
Collaborator

I think they would. Maybe there are some possibilities in the test runner as well.

@amolenaar amolenaar added this to the Next release milestone Apr 6, 2014
@amolenaar amolenaar closed this in 3851d0c Apr 6, 2014
antoine-aumjaud pushed a commit to antoine-aumjaud/fitnesse that referenced this pull request Jun 12, 2014
Fixes unclebob#339. Now set a property "slim.debug.timeout", either in a page or in the configuration file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants