Duplicate loader statement when unit testing

Hey everyone,

I’m running JRuby 1.5.1 and Shoulda with Test::Unit. I’m getting some
weird duplication on my test output that is cluttering up my screen and
making it harder to read the test results. I’m wondering if anyone
know’s why it might be doing this and how I can fix it so that it isn’t
displayed more than once, if at all. The part that is duplicating is
shown below and is after the “6 tests, 6 assertions, 0 failures, 0
errors” part of the test result output:


[[email protected]_machine my_app]$ rake test
(in /home/me/my_app)
/home/me/jruby-1.5.1/bin/jruby -I"lib:test"
“/home/me/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
“test/unit/topic_test.rb”
/home/me/jruby-1.5.1/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3.2-java/lib/ruby-debug-base.rb:214
warning: tracing (e.g. set_trace_func) will not capture all events
without --debug flag
Loaded suite
/home/me/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started

Finished in 0.328 seconds.

6 tests, 6 assertions, 0 failures, 0 errors
/home/me/jruby-1.5.1/bin/jruby -I"lib:test"
“/home/me/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”
/home/me/jruby-1.5.1/bin/jruby -I"lib:test"
“/home/me/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb”

Anybody got any ideas? Also, is there anyway to remove the warning:
“tracing will not capture all events without the --debug flag”?

Thanks for the help!

Cheers,
Eric

Hmm…that looks like some logging code got left in somewhere, like
code that logs what the spawned command is. It could be in JRuby, or
it could be in some other library. Is it possible to try under MRI to
see if it outputs duplicate data like that?

As for the --debug… I’m not sure what library it is, but something
you’re using uses set_trace_func for some purpose, which is not
normally fully enabled in JRuby due to the cost it adds to making
calls.

  • Charlie

On Mon, Aug 2, 2010 at 8:27 PM, Eric S. [email protected]
wrote:


Started
Anybody got any ideas? Also, is there anyway to remove the warning:
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Charles Nutter wrote:

Hmm…that looks like some logging code got left in somewhere, like
code that logs what the spawned command is. It could be in JRuby, or
it could be in some other library. Is it possible to try under MRI to
see if it outputs duplicate data like that?

As for the --debug… I’m not sure what library it is, but something
you’re using uses set_trace_func for some purpose, which is not
normally fully enabled in JRuby due to the cost it adds to making
calls.

  • Charlie

On Mon, Aug 2, 2010 at 8:27 PM, Eric S. [email protected]
wrote:


Started
Anybody got any ideas? Also, is there anyway to remove the warning:
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Thanks for the reply. I’m not sure how to try it under MRI, I’m fairly
new to Ruby and JRuby. Also, I’m wondering if it has anything to do with
the jdbc adapters I’m using? That’s the only thing I can think of that
was different between a default JRuby install and when I started
receiving those messages when I tried to run my tests. Still a little
clueless tho. Any more info you have please send my way, thanks again!

Cheers,
Eric

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs