Have you tried sidelining other .rb files under hbase-shell//src/test/ruby/shell/ (keeping only hbase-shell//src/test/ruby/shell/list_procedures_test.rb) ?
Cheers On Mon, Jul 30, 2018 at 8:29 PM Jack Bearden <j...@jackbearden.com> wrote: > Hey all! I was hacking hbase-shell and JRuby over the weekend and wanted to > get some feedback on workflow. My objective was to execute a single Ruby > unit test in isolation from the TestShell.java class via the jruby binary. > I was able to accomplish this by doing the following steps: > > 1. Pulled down branch-2 > 2. Installed and cleaned via maven at the base directory (mvn > -Dmaven.javadoc.skip -DskipTests install) > 3. Changed to the hbase-shell directory and exported the classpath (mvn > dependency:build-classpath -Dmdep.outputFile=/path/to/cpath.txt) > 4. Exported the path to that file to shell env (export > TEST_PATH="/path/to/cpath.txt") > 5. Hacked tests_runner.rb to just load("path/to/test") for the test I > wanted to run > 6. From the hbase-shell project directory ran the following: > > jruby \ > -J-cp `cat $TEST_PATH` \ > -d -w \ > -I src/test/ruby \ > -I src/main/ruby \ > src/test/ruby/tests_runner.rb > > The problem is, is this only worked on *most* of the hbase-shell Ruby > tests. The only way to get, for example, list_procedures_test.rb to work > completely, was to run it from the TestShell.java file. When ran from the > jruby binary, I get a "class not found" when > org.apache.hadoop.hbase.client.procedure.ShellTestProcedure.new was being > referenced. I can't figure out how to load this class adhoc and not through > what appears to be Maven magic. > > Any suggestions or better ideas on how to do this? >