mirror of
https://github.com/apache/impala.git
synced 2026-01-04 09:00:56 -05:00
This is the first set of changes required to start getting our functional test infrastructure moved from JUnit to Python. After investigating a number of option, I decided to go with a python test executor named py.test (http://pytest.org/). It is very flexible, open source (MIT licensed), and will enable us to do some cool things like parallel test execution. As part of this change, we now use our "test vectors" for query test execution. This will be very nice because it means if load the "core" dataset you know you will be able to run the "core" query tests (specified by --exploration_strategy when running the tests). You will see that now each combination of table format + query exec options is treated like an individual test case. this will make it much easier to debug exactly where something failed. These new tests can be run using the script at tests/run-tests.sh
29 lines
845 B
Python
29 lines
845 B
Python
#!/usr/bin/env python
|
|
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
|
|
# Targeted Impala HBase Tests
|
|
#
|
|
import logging
|
|
import pytest
|
|
from tests.common.test_vector import *
|
|
from tests.common.impala_test_suite import *
|
|
|
|
class TestHBaseQueries(ImpalaTestSuite):
|
|
@classmethod
|
|
def get_dataset(self):
|
|
return 'functional-query'
|
|
|
|
@classmethod
|
|
def add_test_dimensions(cls):
|
|
super(TestHBaseQueries, cls).add_test_dimensions()
|
|
cls.TestMatrix.add_constraint(\
|
|
lambda v: v.get_value('table_format').file_format == 'text')
|
|
|
|
def test_hbase_scan_node(self, vector):
|
|
self.run_test_case('QueryTest/hbase-scan-node', vector)
|
|
|
|
def test_hbase_row_key(self, vector):
|
|
self.run_test_case('QueryTest/hbase-rowkeys', vector)
|
|
|
|
def test_hbase_filters(self, vector):
|
|
self.run_test_case('QueryTest/hbase-filters', vector)
|