[trinidad] down to a single failure #482

wants to merge 11 commits into


None yet

2 participants

  1) Failure:
    [/home/kares/workspace/github/sinatra/test/integration_test.rb:32:in `IntegrationTest'
     org/jruby/RubyKernel.java:2045:in `instance_eval'
     /home/kares/workspace/github/sinatra/test/integration_helper.rb:214:in `test_with_trinidad_streams'
     org/jruby/RubyProc.java:270:in `call'
     org/jruby/RubyKernel.java:2076:in `send'
     org/jruby/RubyArray.java:1615:in `each'
     org/jruby/RubyArray.java:1615:in `each']:
<["a", "b"]> expected but was

notably I've changed the integration test app to use Rack::CommonLogger over a file,
mostly due JRuby (we would need to change Java's native out/err streams to redirect otherwise) but makes the test overall most consistent by logging requests into log/app.log

I'm not sure about how to pass the streaming test if anything that's a jruby-rack bug, but my mind did not really process it ... feel free to open an issue if you feel like it's important, someone will eventually look into it someday :)

kares added some commits Mar 11, 2012
@kares kares can't seem to run tests without this with rvm on linux:
RACK_ENV=development exec "/opt/local/rvm/rubies/ree-1.8.7-2011.12/bin/ruby" -I "/home/kares/workspace/github/sinatra/lib" "/home/kares/workspace/github/sinatra/test/integration/app.rb" -s thin -o -p 5001 -e development 2>&1
/home/kares/workspace/github/sinatra/lib/sinatra/base.rb:2:in `require': no such file to load -- rack (LoadError)
	from /home/kares/workspace/github/sinatra/lib/sinatra/base.rb:2
	from /home/kares/workspace/github/sinatra/lib/sinatra.rb:1:in `require'
	from /home/kares/workspace/github/sinatra/lib/sinatra.rb:1
	from /home/kares/workspace/github/sinatra/test/integration/app.rb:2:in `require'
	from /home/kares/workspace/github/sinatra/test/integration/app.rb:2
@kares kares only try trinidad and webrick with jruby 069604c
@kares kares adjust jruby embedded server to actually work abd0d9c
@kares kares use Rack::CommonLogger with a cutom logger over log/app.log 5426bfd
@kares kares add a JRuby JS runtime so one can `bundle exec rake test` to make sur…
…e correct version of trinidad (from git) gets loaded
@kares kares test fix 1addc22
@kares kares referenced this pull request in trinidad/trinidad Mar 11, 2012

Eating all the logs #58

@rkh rkh and 1 other commented on an outdated diff Mar 12, 2012
@@ -59,4 +62,6 @@ class Subclass < Sinatra::Base
use Subclass
-$stderr.puts "starting"
+use Rack::CommonLogger, logger # to set a custom logger
rkh Mar 12, 2012

I'm not sure I'm 100% happy with this, as the tests are supposed to make sure logging works without any configuration.

kares Mar 12, 2012

You're right. I relaxed this cause we're not really interested in all the crap a server prints but only the logging coming out of the app, but of course I'm biased since I wanted to avoid printing to env['rack.errors'] as it complicates things on the JRuby side.

I'll look into "extensible" logging all the way down to jruby-rack in embedded scenarios, but I can't promise anything.

Sinatra member

Thanks for the Pull Request, if streaming doesn't work, we could also skip that test (as we do for webrick).

@kares kares referenced this pull request in trinidad/trinidad Mar 13, 2012

log to the vm streams #62

@kares kares referenced this pull request in jruby/jruby-rack Mar 14, 2012

embedded RackConfig with out/err streams correctly setup #103


@rkh and we're all green with freshly baked trinidad 1.3.5

@rkh rkh closed this in cab56ed May 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment