Page tree
Skip to end of metadata
Go to start of metadata

Loading test data

Run all tests:

Run just front-end tests


See Debugging front-end test if you need to look into a test behavior such as unexpected error, hanging and so on.

Run just back-end tests

Run most end-to-end tests

Run custom cluster tests

Run stress test

Things to look for in Test Failures

  1. Look for Minidump crashes. These look like: ./Impala/logs_static/logs/ee_tests/minidumps/impalad/71bae77a-07d2-4b6e-0885eca5-adc7ee36.dmp. Because some tests run in parallel (especially in the "ee" test suite), if one of the Impala daemons crashed, subsequent test results are meaningless. Start with the crash. If you see a crash dump, it's possible that there's a stack trace in the logs:
    # ag is a recursive grep tool; see
    $ag 'Check failure stack trace:'
    101743:*** Check failure stack trace: ***
    101746:*** Check failure stack trace: ***
    12:*** Check failure stack trace: ***
    12:*** Check failure stack trace: ***
    12:*** Check failure stack trace: ***


  2. Look for "FAILED" (case insensitive) in the log output of the Jenkins job:

    $cat console | egrep -o -i 'FAILED +[^ ]+ +[^ ]+'
    FAILED query_test/[exec_option: {'disable_codegen_rows_threshold':
    FAILED query_test/[exec_option: {'debug_action':
    FAILED query_test/[exec_option: {'disable_codegen_rows_threshold':
    failed to connect:
    failed in 12443.43
    failed in 4077.50
  3. The tests produce xunit XML files; you can look for failures in these like so:
    # Search for and extract 'failure message="..."' in all XML files; uses
    # a multiline RE.
    $grep -Pzir -o 'failure message=\"[^"]*' $(find . -name '*.xml') | tr '\0' ' ' | head
    ./Impala/logs_static/logs/ee_tests/results/TEST-impala-parallel.xml:failure message="query_test/ in test_subplan
    self.run_test_case('QueryTest/nested-types-subplan', vector)
    common/ in run_test_case
    result = self.__execute_query(target_impalad_client, query, user=user)
    common/ in __execute_query
    return impalad_client.execute(query, user=user)
    common/ in execute
    return self.__beeswax_client.execute(sql_stmt, user=user)
    beeswax/ in execute
    handle = self.__execute_query(query_string.strip(), user=user)

New tests should be created in areas similar to existing tests.

In general, try to keep similar tests with similar scope together.

  • Any changes to the sql-parser.cup should have corresponding tests created in
    • ParsesOk() and ParserError() are the two validation methods used for tests.
  • Any changes in the analysis phase (e.g. under the package org.apache.impala.analysis) should have corresponding tests created in Analyze* (e.g.,, 
    • AnalyzesOk() and AnalysisError() are the main two validation methods used for tests but there are other utility methods available.
  • Any changes that would involve authorization checks involving Sentry should have corresponding tests created in
    • AuthzOk() and AuthzError() are the two validation methods used for tests.
    • Note: These test are different than ones in  In, tests are validating the analysis phase of SQL statements related to authorization, where as uses Sentry to validate the authorization code granted by specific roles.
    • The comments at the top of this file indicate the various privileges that are granted on different objects.  Any changes or additions to the setup should be reflected here to maintain a single source of truth for the authorization tests. 
    • These are currently the only set of tests that utilize Sentry.
  • Any changes that require multiple SQL statements to execute, or require validation of the result should be created in the appropriate *.test file under testdata/workloads/...
    • .test files should contain blocks that contain only one of any section, e.g. "----QUERY", "----RESULTS", "----TYPES", etc.  Look at the other files for examples.

What is the difference between impala-py.test and test/

py.test ( is a framework for writing tests in Python. It's got a bunch of features. impala-py.test is a small wrapper that invokes py.test in the right environment (i.e., from the "virtualenv") and with LD_LIBRARY_PATH updated. When you're using impala-py.test, you're using py.test's mechanisms. Meanwhile, test/ is a wrapper that invokes py.test a few times. It uses environment variables for control. Then it executes any "serial" tests, and then it executes some stress tests, and then, it instructs py.test to execute the "parallel" tests (those not marked serial or stress) with a bunch of parallelism. If you plotted your CPU graph while this was happening, you'd see something like. You can tell where the parallel testing happens about 3/4 of the way through. To make things even more complicated, there's bin/, which invokes (but also "mvn test" and the C++ tests), and, which invokes


  • No labels



    Tim Armstrong, in the stress test, how would I get for myself a tpch_60_parquet database?

    1. There isn't a super-easy way that I'm aware of - you can piece something together using tpch dbgen and ./bin/ I updated the instructions to refer to a DB that is available by default.


      1. ./bin/ now supports loading larger scales of TPC-H