Versions Compared

Key

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

...

See the FAQ "How do I add a test case?" for more details.

Beeline Query Unit Test

Legacy query test Drivers (all of them except TestBeeLineDriver) uses HiveCli to run the tests. TestBeeLineDriver runs the tests using the BeeLine client. Creates a specific database for them, so the tests can run parallel. Running the tests you have the following configuration options:

  • -Dqfile=XXXXXX.q  - To run one or more specific query file tests. For the exact format, check the Query Unit Test paragraph. If not provided only those query files from ql/src/test/queries/clientpositive directory will be run which are mentioned in itests/src/test/resources/testconfiguration.properties in the beeline.positive.include parameter.

  • -Dtest.output.overwrite=true - This will rewrite the output of the q.out files in ql/src/test/results/clientpositive/beeline. The default value is false, and it will check the current output against the golden files

  • -Dtest.rewrite.source.tables=true - This will change the query files, and the query output files so the output files will remain the same than before (without creating a specific database for the tests). The default value is true.
  • -Djunit.parallel.threads=10 - The number of the parallel threads running the tests. The default is 10.
  • The BeeLine tests could run against an existing cluster. Or if not provided then against a MiniHS2 cluster created during the tests
    • -Dtest.beeline.url - The jdbc url which should be used to connect to the existing cluster. If not set then a MiniHS2 cluster will be created instead
    • -Dtest.beeline.user - The user which should be used to connect to the cluster. If not set "user" will be used
    • -Dtest.beeline.password - The password which should be used to connect to the cluster. If not set "password" will be used
    • -Dtest.data.dir - The test data directory on the cluster. If not set <HIVEROOT>/data/files will be used

Debugging

Please see Debugging Hive code in Development Guide.

...