Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
mvn test -Dtest=ClassName#methodName -Phadoop-1

Note that a pattern can also be supplied to -Dtests to run multiple tests matching the pattern:

Code Block
mvn test -Dtest='org.apache.hive.beeline.*' -Phadoop-1

For more usage see the documentation for the Maven surefire plugin.

Why isn't the itests pom connected to the root pom?

...

Info
titleLegacy information for the Ant build

Make sure that your JAVA_HOME is appropriately set (some tests need this), and set ANT_OPTS to increase the size allocated to the Permanent Generation as per the following:

Code Block
export ANT_OPTS="-XX:MaxPermSize=512m"

Then, for a clean build, run

Code Block
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 I run all of the unit tests except for a certain few tests?

Similar to running all tests, but define test.excludes.additional to specify a test/pattern to exclude from the test run. For example the following will run all tests except for the CliDriver tests:

 

Code Block
cd itests 
mvn test -Dtest.excludes.additional='**/Test*CliDriver.java' -Phadoop-1

How do I update the output of a CliDriver testcase?

...