Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added section on how to add a test case

...

See Hive Logging for details about log files, including alternative configurations.

How do I add a test case?

First, add the test case to the qfile test suite:

  • Copy the test to a new file under ql/src/test/queries/clientpositive/<filename>.q (or in /clientnegative if it is a negative test).
  • Add the <filename.q> to itests/src/test/resources/testconfiguration.properties to the appropriate variable (ex. minimr.query.files).

Next, generate the golden (output) file the first time you run the test case:

  • Compile the Hive source from the top level Hive directory:

    Code Block
    languagetext
    mvn clean install -DskipTests
  • Compile the itests:

    Code Block
    languagetext
    cd itests
    mvn clean install -DskipTests
  • Run the test and generate the output file using the appropriate -Dtest (ex. TestMinimrCliDriver; see itests/qtest/pom.xml for the names of other test suites):

    Code Block
    languagetext
    cd qtest
    mvn test -Dtest=TestMinimrCliDriver -Dqfile=<filename>.q -Dtest.output.overwrite=true
  • Add your output file to ql/src/test/results/clientpositive/<filename>.q.out (or in /clientnegative if it is a negative test).

With the above steps, you can create a patch which has a java file, a q file and a q.out file.

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

...

At this point, attach the remote debugger as mentioned before to start debugging your queries.