[
https://issues.apache.org/jira/browse/HBASE-26838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sean Busbey updated HBASE-26838:
--------------------------------
Component/s: integration tests
tooling
> Junit jar is not included in the hbase tar ball, causing issues for some
> hbase tools that do rely on it
> --------------------------------------------------------------------------------------------------------
>
> Key: HBASE-26838
> URL: https://issues.apache.org/jira/browse/HBASE-26838
> Project: HBase
> Issue Type: Bug
> Components: integration tests, tooling
> Reporter: Wellington Chevreuil
> Assignee: Wellington Chevreuil
> Priority: Major
>
> We used to include junit jar on the generated tar ball lib directory. After
> some sanitisation of unnecessary libs for most of hbase processes, junit got
> removed from the packing, so that it don't end in hbase classpath by default.
> Some testing tools, however do depend on junit at runtime, and would now fail
> with NoClassDefFoundError, like
> [IntegrationTestIngest:|https://hbase.apache.org/book.html#chaos.monkey.properties]
> {noformat}
> 2022-03-14T21:54:50,483 INFO [main] client.AsyncConnectionImpl: Connection
> has been closed by main.
> Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/Assert
> at
> org.apache.hadoop.hbase.IntegrationTestIngest.initTable(IntegrationTestIngest.java:101)
> at
> org.apache.hadoop.hbase.IntegrationTestIngest.setUpCluster(IntegrationTestIngest.java:92)
> at
> org.apache.hadoop.hbase.IntegrationTestBase.setUp(IntegrationTestBase.java:170)
> at
> org.apache.hadoop.hbase.IntegrationTestBase.doWork(IntegrationTestBase.java:153)
> at
> org.apache.hadoop.hbase.util.AbstractHBaseTool.run(AbstractHBaseTool.java:153)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
> at
> org.apache.hadoop.hbase.IntegrationTestIngest.main(IntegrationTestIngest.java:259)
> Caused by: java.lang.ClassNotFoundException: org.junit.Assert
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
> ... 7 more {noformat}
> Discussing with [~elserj] internally, we believe a reasonable solution would
> be to include junit jar back into the tarball, under "lib/test" dir so that
> it's not automatically added to hbase processes classpath, but still allow
> operators to manually define it in a convenient way, like below:
> {noformat}
> HBASE_CLASSPATH="$HBASE_HOME/lib/tests/*" hbase
> org.apache.hadoop.hbase.IntegrationTesngest -m slowDeterministic {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)