...
Code Block |
---|
|
./buildall.sh -noclean -testdata |
Note: Sometimes your may get a messed up terminal after data loading, e.g. not displaying any typed in characters or carriage return. In this case, type ctrl+c, then type "stty sane"
, then press enter
to recover.
Run all tests:
Code Block |
---|
|
MAX_PYTEST_FAILURES=12345678 ./bin/run-all-tests.sh |
...
Code Block |
---|
|
# For the front-end tests, the minicluster and Impala cluster must be running:
./testdata/bin/run-all.sh
./bin/start-impala-cluster.py
(pushd fe && mvn -fae test)
# To run one group of tests:
(pushd fe && mvn -fae test -Dtest=AnalyzeStmtsTest)
# To run a single test:
(pushd fe && mvn -fae test -Dtest=AnalyzeStmtsTest#TestStar)
# To run a specific parameterized test:
(pushd fe && mvn test -Dtest=AuthorizationTest#TestShowTableResultsFilteredAuthorizationStmtTest#testPrivilegeRequests[0])
# or
(pushd fe && mvn test -Dtest=AuthorizationTest#TestShowTableResultsFilteredAuthorizationStmtTest#testPrivilegeRequests[*]) |
Run just back-end tests
Code Block |
---|
|
# For the back-end tests, the Impala cluster must not be running:
./bin/start-impala-cluster.py --kill
./bin/run-backend-tests.sh
# or
ctest
# To run just one test (and show what broke) (make sure to source ./bin/set-classpath.sh first):
ctest --output-on-failure -R expr-test
# You can also run just a single test at a time. If this fails, be sure
# that you've run set-classpath.sh before-hand.
# You can then use command line parameters to run a subset of tests:
# To get help with parameters:
be/build/latest/runtime/mem-pool-test --help
# To run just one test within a test:
be/build/latest/runtime/mem-pool-test --gtest_filter=MemPoolTest.TryAllocateAligned |
Run just JavaScript tests (webUI pages)
Code Block |
---|
|
# To run JavaScript tests using JEST for the webUI pages
./tests/run-js-tests.sh |
Run most end-to-end tests (but not custom cluster tests)
Code Block |
---|
|
# For the end-to-end tests, Impala must be running:
./bin/start-impala-cluster.py
./tests/run-tests.py
# To run the tests in just one directory:
./tests/run-tests.py metadata
# To run the tests in that directory with a matching name:
./tests/run-tests.py metadata -k test_partition_metadata_compatibility
# To run the tests in a file with a matching name:
./tests/run-tests.py query_test/test_insert.py -k test_limit
# To run the tests that don't match a name:
./tests/run-tests.py query_test/test_insert.py -k "-test_limit".
# To run the tests with more restrictive name-matching
./bin/impala-py.test tests/shell/test_shell_commandline.py::TestImpalaShell::test_multiple_queries
# To run tests only against a specific file format(s):
./tests/run-tests.py --filetable_format_filterformats="seq/snap/block,text"/none
# To change the impalad instance to connect to (default is localhost:21000):
./tests/run-tests.py --impalad=hostname:port
# To use a different exploration strategy (default is core):
./tests/run-tests.py --exploration_strategy=exhaustive
# To run a particular .test file, e.g. testdata/workloads/functional-query/queries/QueryTest/exprs.test
# search for a .py test file which refers to the test, (try 'grep -r QueryTest/exprs tests')
# then run that test file (in this case tests/query_test/test_exprs.py) using run-tests.py
./tests/run-tests.py query_test/test_exprs.py
# To update the results of tests (The new test files will be located in ${IMPALA_EE_TEST_LOGS_DIR}/test_file_name.test):
./tests/run-tests.py --update_results |
...
To make things even more complicated, there's bin/run-all-tests.sh, which invokes run-tests.py (but also "mvn test" and the C++ tests), and buildall.sh, which invokes run-all-tests.sh.
Troubleshooting
1. Test failures due to missing libTestUdfs.so
Code Block |
---|
E MESSAGE: AnalysisException: Could not load binary: /test-warehouse/libTestUdfs.so
E Failed to get file info hdfs://localhost:20500/test-warehouse/libTestUdfs.so
E Error(2): No such file or directory |
That file is created and uploaded by testdata/bin/copy-udfs-udas.sh
. You can try
Code Block |
---|
testdata/bin/copy-udfs-udas.sh -build |