You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Hive Developer FAQ

Testing

How do I run all of the unit tests?

For a clean build, run

ant clean package test

Note that running ant test will not work; ant package does some setup work that is required for the testcases to run successfully.

How do update the output of a CliDriver testcase?

% ant test -Dtestcase=TestCliDriver -Dqfile=alter1.q -Doverwrite=true

How do I run the clientpositive/clientnegative unit tests?

To run clientpositive tests
ant -Dtestcase=TestCliDriver test

To run a single clientnegative test alter1.q
ant -Dtestcase=TestNegativeCliDriver -Dqfile=alter1.q test

To run all of the clientpositive tests that match a regex, e.g. the partition_wise_fileformat tests
ant -Dtestcase=TestCliDriver -Dqfile_regex=partition_wise_fileformat.* test

To run a single contrib test alter1.q and overwrite the result file
ant -Dtestcase=TestContribCliDriver -Dqfile=alter1.q -Doverwrite=true test

To run a single test groupby1.q and output detailed information during execution
ant -Dtestcase=TestCliDriver -Dqfile=groupby1.q -Dtest.silent=false test

How do I publish hive artifacts to my local maven repository?

ant package
ant -Dmvn.publish.repo=local maven-build
ant -Dmvn.publish.repo=local maven-publish
  • No labels