@Test public void testRunNoClusterShellTests() throws IOException { // Start ruby tests without cluster jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/no_cluster_tests_runner.rb"); } }
@BeforeClass public static void setUpBeforeClass() throws Exception { // no cluster List<String> loadPaths = new ArrayList<>(2); loadPaths.add("src/main/ruby"); loadPaths.add("src/test/ruby"); jruby.setLoadPaths(loadPaths); jruby.put("$TEST_CLUSTER", TEST_UTIL); System.setProperty("jruby.jit.logging.verbose", "true"); System.setProperty("jruby.jit.logging", "true"); System.setProperty("jruby.native.verbose", "true"); }
public void execute(final ExecuteContext context) throws Exception { jruby.callMethod(script, "call", context); }
/** * create a new ruby object of the bundler command */ private static Object newScript(final ScriptingContainer scriptingContainer) { IRubyObject runnerClass = scriptingContainer.parse(PathType.CLASSPATH, "nexus/bundle_runner.rb").run(); return scriptingContainer.callMethod(runnerClass, "new", IRubyObject.class); }
public RubyParser( ExecuteManager executeManager ) throws IOException { this.executeManager = executeManager; this.jruby = new IsolatedScriptingContainer(); this.parser = jruby.runScriptlet( PathType.CLASSPATH, "parser.rb" ); this.factory = new RubyExecuteTaskFactory( jruby ); }
public synchronized Model parse( String ruby, File source, Map<String, ?> options ) { Model model = this.jruby.callMethod( this.parser, "parse", new Object[] { ruby, this.factory, source != null ? source.getAbsolutePath() : null }, Model.class ); model.setPomFile( source ); executeManager.register( model, this.factory.getExecuteTasks() ); executeManager.install( model, options ); return model; } }
/** * create a new ruby object of the bundler command */ private static Object newScript(final ScriptingContainer scriptingContainer) { IRubyObject runnerClass = scriptingContainer.parse(PathType.CLASSPATH, "nexus/bundle_runner.rb").run(); return scriptingContainer.callMethod(runnerClass, "new", IRubyObject.class); }
@Test public void testRunShellTests() throws IOException { System.setProperty("shell.test.include", "quotas_test.rb"); // Start all ruby tests jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb"); } }
@BeforeClass public static void setUpBeforeClass() throws Exception { // Start mini cluster TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100); TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250); TEST_UTIL.getConfiguration().setBoolean("hbase.quota.enabled", true); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6); TEST_UTIL.getConfiguration().setBoolean(CoprocessorHost.ABORT_ON_ERROR_KEY, false); TEST_UTIL.getConfiguration().setInt("hfile.format.version", 3); // Below settings are necessary for task monitor test. TEST_UTIL.getConfiguration().setInt(HConstants.MASTER_INFO_PORT, 0); TEST_UTIL.getConfiguration().setInt(HConstants.REGIONSERVER_INFO_PORT, 0); TEST_UTIL.getConfiguration().setBoolean(HConstants.REGIONSERVER_INFO_PORT_AUTO, true); // Security setup configuration SecureTestUtil.enableSecurity(TEST_UTIL.getConfiguration()); VisibilityTestUtil.enableVisiblityLabels(TEST_UTIL.getConfiguration()); TEST_UTIL.startMiniCluster(); // Configure jruby runtime List<String> loadPaths = new ArrayList<>(2); loadPaths.add("src/main/ruby"); loadPaths.add("src/test/ruby"); jruby.setLoadPaths(loadPaths); jruby.put("$TEST_CLUSTER", TEST_UTIL); System.setProperty("jruby.jit.logging.verbose", "true"); System.setProperty("jruby.jit.logging", "true"); System.setProperty("jruby.native.verbose", "true"); }
private static Object newScript(final ScriptingContainer scriptingContainer) { IRubyObject runnerClass = scriptingContainer.parse(PathType.CLASSPATH, "nexus/gem_runner.rb").run(); return scriptingContainer.callMethod(runnerClass, "new", IRubyObject.class); }
@Test public void testRunShellTests() throws IOException { System.setProperty("shell.test.include", "table_test.rb"); // Start all ruby tests jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb"); } }
@BeforeClass public static void setUpBeforeClass() throws Exception { basePath = System.getProperty("basedir"); // Start mini cluster TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100); TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6); TEST_UTIL.getConfiguration().setBoolean(CoprocessorHost.ABORT_ON_ERROR_KEY, false); TEST_UTIL.getConfiguration().setInt("hfile.format.version", 3); // Security setup configuration SecureTestUtil.enableSecurity(TEST_UTIL.getConfiguration()); VisibilityTestUtil.enableVisiblityLabels(TEST_UTIL.getConfiguration()); //Setup RegionServer Groups TEST_UTIL.getConfiguration().set( HConstants.HBASE_MASTER_LOADBALANCER_CLASS, RSGroupBasedLoadBalancer.class.getName()); TEST_UTIL.getConfiguration().set( CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, RSGroupAdminEndpoint.class.getName()); TEST_UTIL.startMiniCluster(4); // Configure jruby runtime List<String> loadPaths = new ArrayList<>(2); loadPaths.add(basePath+"/src/main/ruby"); loadPaths.add(basePath+"/src/test/ruby"); jruby.setLoadPaths(loadPaths); jruby.put("$TEST_CLUSTER", TEST_UTIL); System.setProperty("jruby.jit.logging.verbose", "true"); System.setProperty("jruby.jit.logging", "true"); System.setProperty("jruby.native.verbose", "true"); }
@Test public void testRunShellTests() throws IOException { System.setProperty("shell.test.include", "admin2_test.rb"); // Start all ruby tests jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb"); } }
@Test public void testRunShellTests() throws IOException { System.setProperty("shell.test.exclude", "replication_admin_test.rb,rsgroup_shell_test.rb," + "admin_test.rb,table_test.rb,quotas_test.rb"); // Start all ruby tests jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb"); } }
@Test public void testRunShellTests() throws IOException { System.setProperty("shell.test.include", "admin_test.rb"); // Start all ruby tests jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb"); } }
@Test public void testRunShellTests() throws IOException { try { // Start only GroupShellTest System.setProperty("shell.test", "Hbase::RSGroupShellTest"); jruby.runScriptlet(PathType.ABSOLUTE, basePath + "/src/test/ruby/tests_runner.rb"); } finally { System.clearProperty("shell.test"); } } }
@Test public void testRunShellTests() throws IOException { System.setProperty("shell.test.include", "replication_admin_test.rb"); // Start all ruby tests jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb"); } }