You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Ravi Prakash <ra...@gmail.com> on 2016/06/24 21:48:17 UTC

Re: Running unit tests?

Thanks for the reply Thejas! I'm sorry for the late reply, my email client
didn't join the email threads.

Unfortunately, a simple mvn install fails for me. I usually use this
command to build hive:
mvn install -DskipTests -Phadoop-2 -DcreateChecksum=true
-Dmaven.javadoc.skip=true -Dmaven-javadoc-plugin=false

The problem was that I was not using the hadoop-2 profile. Once I run
mvn test -Phadoop-2 -Dtest=TestCliDriver -Dqfile_regex=mergejoin_3way*

it works (because the hbase-server dependency is only defined in the
hadoop-2 profile  :
https://github.com/apache/hive/blob/branch-1.2/itests/qtest/pom.xml#L318 .
(I was trying to run on branch-1.2)

Thanks a lot!
Ravi

On Wed, May 4, 2016 at 10:54 AM, Ravi Prakash <ra...@gmail.com> wrote:

> Hi!
>
> Could someone please tell me how to run the clientpositive/clientnegative
> itests/qtest tests ? This document :
> https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ#HiveDeveloperFAQ-HowdoIruntheclientpositive/clientnegativeunittests?
> mentions running ant package as the first step, but I don't see a build.xml
> in the root directory, itests directory or qtests.
>
> When I run the maven commands (cd itests/qtest;mvn test
> -Dtest=TestCliDriver)
>
> I get this error:
>
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.558 sec
> <<< FAILURE! - in org.apache.hadoop.hive.cli.TestCliDriver
> initializationError(org.apache.hadoop.hive.cli.TestCliDriver)  Time
> elapsed: 0.006 sec  <<< ERROR!
> java.lang.NoClassDefFoundError:
> org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>     at
> org.apache.hadoop.hive.ql.QTestUtil$QTestSetup.preTest(QTestUtil.java:1722)
>     at org.apache.hadoop.hive.ql.QTestUtil.<init>(QTestUtil.java:425)
>     at
> org.apache.hadoop.hive.cli.TestCliDriver.<clinit>(TestCliDriver.java:53)
>
> Could you please update the documentation for the latest source?
>
> Thanks
> Ravi
>