rubyslim icon indicating copy to clipboard operation
rubyslim copied to clipboard

Not compatable with Fitnesse 20161106

Open AlexMooney opened this issue 7 years ago • 2 comments

With the latest version, @dineshs-freshdesk and I have seen lib/rubyslim/socket_service.rb:19:in initialize': Permission denied - bind(2) for nil port 1 (Errno::EACCES)` when trying to run tests which work using version 20160515. See the issue here for context and to reproduce the problem.

I believe the problem was caused by this PR in Fitnesse.

AlexMooney avatar Oct 17 '17 13:10 AlexMooney

If you add to your FitNesse page the line

!define SLIM_PORT {0}

Slim will pick an available port at random to communicate with the server.

If you want to control this a bit more, you can set a fixed port number via e.g.

!define SLIM_PORT {9966}

(or any other port number that is convenient for you). Slim will start from that port and tries the next 10 ports in case of collisions.

NicoleRauch avatar Nov 02 '17 14:11 NicoleRauch

Thanks for the advice! When I use gem 'rubyslim', git: 'gem 'rubyslim', git: '[email protected]:lvonk/rubyslim.git' in my Gemfile, then this makes the latest version of Fitnesse work again!

Unfortunately, when I use gem 'rubyslim', git: '[email protected]:unclebob/rubyslim.git', it breaks regardless of using the new or old version of Fitnesse (relative to the PR I referenced). I tried both {0} and {9966} (which is not in use on my machine) on the page with the tests as well as the Suite page where I had !define TEST_SYSTEM {slim}, but I see the same error as before. I'm using ruby 2.2.2p95.

This is what I'm attempting to run:

WORK_DIR=`pwd`
TEST_RUNNER=$WORK_DIR/bin/rubyslim_wrapper
COMMAND_PATTERN=$TEST_RUNNER

cd fitnesse
java -DWORK_DIR="$WORK_DIR" -DTEST_RUNNER="$TEST_RUNNER" -DCOMMAND_PATTERN="$COMMAND_PATTERN" -jar fitnesse-standalone.jar -p 8888 -e 0  "$@"

This is the stack trace when I attempt to run the tests:

Nov 07, 2017 2:51:24 PM fitnesse.ConfigurationParameter loadProperties
INFO: No configuration file found (/Users/amooney/cmmgithub/fitnesse/fitnesse/plugins.properties)
Bootstrapping FitNesse, the fully integrated standalone wiki and acceptance testing framework.
root page: fitnesse.wiki.fs.WikiFilePage: FitNesseRoot
logger: none
authenticator: fitnesse.authentication.PromiscuousAuthenticator
page factory: fitnesse.html.template.PageFactory
page theme: bootstrap
Starting FitNesse on port: 8888
WARNING: An error occured while fulfilling user request [fitnesse.http.HttpException: The request string is malformed and can not be parsed]
java.util.concurrent.ExecutionException: fitnesse.http.HttpException: The request string is malformed and can not be parsed
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
	at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:105)
	at fitnesse.FitNesseExpediter.run(FitNesseExpediter.java:58)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: fitnesse.http.HttpException: The request string is malformed and can not be parsed
	at fitnesse.http.Request.checkRequestLine(Request.java:159)
	at fitnesse.http.Request.readAndParseRequestLine(Request.java:73)
	at fitnesse.http.Request.parse(Request.java:61)
	at fitnesse.FitNesseExpediter$1.call(FitNesseExpediter.java:102)
	at fitnesse.FitNesseExpediter$1.call(FitNesseExpediter.java:99)
	... 4 more

My immediate problem is solved, but it means I'm stuck on the unmaintained lvonk fork of fitnesse, apparently.

AlexMooney avatar Nov 07 '17 20:11 AlexMooney