Re: [jruby-dev] How to isolate load tests

2011-11-07 Thread Uwe Kubosch
I tried using the test_helper.rb method that creates a new ScriptingContainer, run_in_sub_runtime, but that had no effect. On 2011-11-07, at 18:55, Nick Sieger wrote: > That looks fine. Another way to do it is to use a ScriptingContainer. > See spec/java_integration/utilities/jdbc_unloader_spec

Re: [jruby-dev] How to isolate load tests

2011-11-07 Thread Nick Sieger
That looks fine. Another way to do it is to use a ScriptingContainer. See spec/java_integration/utilities/jdbc_unloader_spec.rb for an example. /Nick On Mon, Nov 7, 2011 at 3:15 AM, Uwe Kubosch wrote: > Answering my own message: > > I now ensure the code is run in a fresh process like this: > >

Re: [jruby-dev] How to isolate load tests

2011-11-07 Thread Uwe Kubosch
Answering my own message: I now ensure the code is run in a fresh process like this: {noformat} with_jruby_shell_spawning do `bin/jruby -e "load File.join('file:', File.join(File.expand_path(File.dirname('#{__FILE__}')), 'requireTest.jar!'), 'A', 'B.rb') ; B"` assert_equal 0, $?

[jruby-dev] How to isolate load tests

2011-11-07 Thread Uwe Kubosch
Hi all! I have written a load test for JRUBY-6172 that uncovers a case where load fails when it should succeed. The test fails correctly when run alone, but succeeds when run with another test that modifies the classpath. The test uses test/test_helper.rb to run code in a separate JRuby insta