Files
impala/tests/custom_cluster/test_metastore_events_cleanup.py
Michael Smith e27e4eb54a IMPALA-11941: (Addendum) ease testing other JDKs
Makes it simpler to build with one JDK and run tests with another.
TEST_JDK_VERSION sets IMPALA_JDK_VERSION before running tests, so the
Impala cluster is started with that JDK. TEST_JAVA_HOME_OVERRIDE sets
IMPALA_JAVA_HOME_OVERRIDE if a non-OS version of Java is required.

Restart Kudu with original JAVA_HOME in frontend tests.

Also skips restarting Hive, Kudu, and Ranger in tests as they'll restart
with a different JDK than originally started with.

Testing:
1. built normally
2. ran "TEST_JDK_VERSION=17 run-all-tests.sh"
3. verified various logs contain "java.specification.version:17"

Change-Id: I46b5515efd9537d63b843dbc42aa93b376efce00
Reviewed-on: http://gerrit.cloudera.org:8080/20143
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2023-07-27 02:10:17 +00:00

48 lines
2.1 KiB
Python

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import, division, print_function
import pytest
import os
from tests.common.custom_cluster_test_suite import CustomClusterTestSuite
from tests.common.skip import SkipIf
IMPALA_HOME = os.getenv('IMPALA_HOME')
HIVE_SITE_EVENTS_CLEANUP = IMPALA_HOME + '/fe/src/test/resources/hive-site-events-cleanup'
class TestTableLoadingWithEventsCleanUp(CustomClusterTestSuite):
@pytest.mark.execute_serially
@SkipIf.is_test_jdk
@CustomClusterTestSuite.with_args(hive_conf_dir=HIVE_SITE_EVENTS_CLEANUP)
def test_table_load_with_events_cleanup(self, unique_database):
"""Regression test for IMPALA-11028"""
self.execute_query_expect_success(self.client, "create table {}.{}"
"(id int)".format(unique_database,
"t1"))
self.execute_query_expect_success(self.client, "create table {}.{}"
"(id int)".format(unique_database,
"t2"))
self.execute_query_expect_success(self.client, "select sleep(120000)")
self.execute_query_expect_success(self.client, "create table {}.{}"
"(id int)".format(unique_database,
"t3"))
self.execute_query_expect_success(self.client, "select * from "
"{}.{}".format(unique_database, "t1"))