hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Question regarding hbase-shell JRuby testing workflow
Date Tue, 31 Jul 2018 14:41:11 GMT
I haven't ever tried to de-couple from Maven. The 'lowest' I ever got 
was something like the following:

1. mvn clean install -DskipTests
2. cd hbase-shell
2. mvn package -Dtest=TestShell -Dshell.test.include=my_test_class.rb -o

Hope this helps, Jack. I know it's not ideal -- if you do come up with 
something that works at a lower level, I think we'd be very supportive 
to get it doc'ed and keep it working :)

On 7/30/18 11:16 PM, Jack Bearden 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?

View raw message