Skip to content
Permalink
Browse files
fix the osgi tests by improving the test whether posix uses native or…
… not
  • Loading branch information
mkristian committed Dec 11, 2014
1 parent 2746b56 commit 79d567507e8d27cb457f4e181c32e3ba94201c1c
@@ -78,7 +78,7 @@ public void testJRubyCreate() throws Exception {
System.err.println();

// System.setProperty( "jruby.debug.loadService", "true" );
System.setProperty( "jruby.native.verbose", "true" );
//System.setProperty( "jruby.native.enabled", "true" );

IsolatedScriptingContainer jruby = new IsolatedScriptingContainer();
jruby.addLoadPath( Scripts.class.getClassLoader() );
@@ -102,11 +102,9 @@ public void testJRubyCreate() throws Exception {
String list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\"]");

// ensure we can load ffi
loaded = (Boolean) jruby.runScriptlet( "require 'ffi'" );
//assertEquals(true, loaded);
list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\"]");
// ensure we have native working
loaded = (Boolean) jruby.runScriptlet( "JRuby.runtime.posix.is_native" );
assertEquals(true, loaded);

// ensure we can load openssl (with its bouncy-castle jars)
loaded = (Boolean) jruby.runScriptlet( "require 'openssl'" );

This file was deleted.

@@ -83,12 +83,12 @@ public void testJRubyCreate() throws InterruptedException {
String list = (String) jruby.runScriptlet( "Gem.loaded_specs.keys.inspect" );
assertEquals(list, "[\"rake\"]");

// ensure we can load openssl (with its bouncy-castle jars)
loaded = (Boolean) jruby.runScriptlet( "require 'openssl'" );
// ensure we have native working
loaded = (Boolean) jruby.runScriptlet( "JRuby.runtime.posix.is_native" );
assertEquals(true, loaded);

// ensure we can load ffi
loaded = (Boolean) jruby.runScriptlet( "require 'ffi'" );
// ensure we can load openssl (with its bouncy-castle jars)
loaded = (Boolean) jruby.runScriptlet( "require 'openssl'" );
assertEquals(true, loaded);

String gemPath = (String) jruby.runScriptlet( "Gem::Specification.dirs.inspect" );

0 comments on commit 79d5675

Please sign in to comment.