Versions Compared

Key

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

...

  • Normal unit test: These are used by testing a particular component of Hive.
    • We just need to add a new class (name must start with "Test") in */src/test directory.
    • We can run "ant test -Dtestcase=TestAbc" where TestAbc is the name of the new class. This will test only the new testcase, which will be faster than "ant test" which tests all testcases.
  • A new query: If the new feature can be tested using Hive command line, we just need to add a new *.q file and a new *.q.out file:
    • If the feature is added in ql
      • Add a new XXXXXX.q file in ql/src/test/queries/clientpositive
      • Run "ant test -Dtestcase=TestCliDriver -Dqfile=XXXXXX.q -Doverwrite=true -Dtest.silent=false". This will generate a new XXXXXX.q.out file in ql/src/test/results/clientpositive.
        • If you want to run multiple .q files in the test run, you can specify comma separated .q files, for example- -Dqfile="X1.q,X2.g" . You can also specify a java regex, for example -Dqfile='join.'. The regex match first removes the .q from the file name before matching regex, so specifying "join.q" will not work.
    • If the feature is added in contrib
      • Do the steps above, replacing "ql" with "contrib", and "TestCliDriver" with "TestContribCliDriver".

...