Evan Weaver wrote:
Hi JRuby-devs,
I'm working on the official JRuby Mongrel port, with the help of Nick,
and I've run into some strange interaction issues with test/unit:
http://pastie.caboo.se/108014
#1 test_configurator bombing out for me
First problem I had was line 85 in test_configurator raising a
SocketError instead of either Errno. This is because the test is wrong.
After the call to stop, there's no guarantee that the thread running
Mongrel will have stopped by the time the connection attempt is made.
What appears to happen is that the socket is still in the process of
being torn down when HTTP.get is run, causing a different error.
So that test needs to be fixed to first confirm that the target Mongrel
has actually stopped before attempting to connect. This was never a
problem under MRI since it doesn't actually run threads in parallel.
#2 test configurator with test debug - no tests get run
I think this is caused by the log/mongrel_debug dir not getting cleaned
up correctly somewhere. I had the same problem with test_debug not
running at all until I deleted log/mongrel_debug:
~/NetBeansProjects/mongrel $ jruby -w -Ilib:ext:bin:test test/test_debug.rb
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
Loaded suite test/test_debug
Started
.
Finished in 0.063 seconds.
1 tests, 1 assertions, 0 failures, 0 errors
~/NetBeansProjects/mongrel $ ls log
mongrel_debug
~/NetBeansProjects/mongrel $ jruby -w -Ilib:ext:bin:test test/test_debug.rb
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
#3 test configurator with test conditional - threading explodes
I could not reproduce this, though it did seem to lock up once. This may
indicate a race condition somewhere in threading code, either in Mongrel
or in JRuby. At any rate, the NullPointerException indicates there's
probably a bug in your JDK...what version did you use? FYI, do *not* use
GCJ...it generally breaks with JRuby.
#4 full test
A few things:
test_ws.rb line 60:
s.write(" ") if RUBY_PLATFORM =~ /mingw|mswin|cygwin/
...this will never be true on JRuby; what's it for?
All these errors:
1) Error:
test_bad_client(WebServerTest):
NameError: uninitialized constant WebServerTest::HttpServer
./test/test_ws.rb:28:in `setup'
2) Error:
test_bad_client(WebServerTest):
NoMethodError: undefined method `stop' for nil:NilClass
./test/test_ws.rb:37:in `teardown'
Appear to be due to HttpServer not existing. Where is that coming from?
- Charlie
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email