Files
impala/tests/custom_cluster/test_exchange_delays.py
Csaba Ringhofer f98b697c7b IMPALA-13929: Make 'functional-query' the default workload in tests
This change adds get_workload() to ImpalaTestSuite and removes it
from all test suites that already returned 'functional-query'.
get_workload() is also removed from CustomClusterTestSuite which
used to return 'tpch'.

All other changes besides impala_test_suite.py and
custom_cluster_test_suite.py are just mass removals of
get_workload() functions.

The behavior is only changed in custom cluster tests that didn't
override get_workload(). By returning 'functional-query' instead
of 'tpch', exploration_strategy() will no longer return 'core' in
'exhaustive' test runs. See IMPALA-3947 on why workload affected
exploration_strategy. An example for affected test is
TestCatalogHMSFailures which was skipped both in core and exhaustive
runs before this change.

get_workload() functions that return a different workload than
'functional-query' are not changed - it is possible that some of
these also don't handle exploration_strategy() as expected, but
individually checking these tests is out of scope in this patch.

Change-Id: I9ec6c41ffb3a30e1ea2de773626d1485c69fe115
Reviewed-on: http://gerrit.cloudera.org:8080/22726
Reviewed-by: Riza Suminto <riza.suminto@cloudera.com>
Reviewed-by: Daniel Becker <daniel.becker@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2025-04-08 07:12:55 +00:00

80 lines
3.7 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
from tests.common.custom_cluster_test_suite import CustomClusterTestSuite
from tests.common.environ import build_flavor_timeout
from tests.common.skip import SkipIfBuildType
from tests.util.filesystem_utils import IS_S3, IS_ADLS, IS_ISILON, IS_OZONE, IS_ENCRYPTED
# IMPALA-6100: add additional margin for error for slow build types.
SLOW_BUILD_TIMEOUT=20000
DELAY_MS = build_flavor_timeout(10000, slow_build_timeout=SLOW_BUILD_TIMEOUT)
# IMPALA-6381: Isilon can behave as a slow build.
if IS_ISILON:
DELAY_MS = SLOW_BUILD_TIMEOUT
@SkipIfBuildType.not_dev_build
class TestExchangeDelays(CustomClusterTestSuite):
"""Tests for handling delays in finding data stream receivers"""
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(
"--stress_datastream_recvr_delay_ms={0}".format(DELAY_MS)
+ " --datastream_sender_timeout_ms=5000"
+ " --impala_slow_rpc_threshold_ms=500")
def test_exchange_small_delay(self, vector):
"""Test delays in registering data stream receivers where the first one or two
batches will time out before the receiver registers, but subsequent batches will
arrive after the receiver registers. Before IMPALA-2987, this scenario resulted in
incorrect results.
"""
self.run_test_case('QueryTest/exchange-delays', vector)
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(
"--stress_datastream_recvr_delay_ms={0}".format(DELAY_MS)
+ " --datastream_sender_timeout_ms=1"
+ " --impala_slow_rpc_threshold_ms=500")
def test_exchange_large_delay(self, vector):
"""Test delays in registering data stream receivers where all of the batches sent
will time out before the receiver registers. Before IMPALA-2987, this scenario
resulted in the query hanging.
"""
self.run_test_case('QueryTest/exchange-delays', vector)
# The SQL used for test_exchange_large_delay_zero_rows requires that the scan complete
# before the fragment sends the EOS message. A slow scan can cause this test to fail,
# because the receivers could be set up before the fragment starts sending (and thus
# can't time out). Use a longer delay for platforms that have slow scans:
# IMPALA-6811: S3/ADLS have slow scans.
# IMPALA-6866: Isilon has slow scans (and is counted as a slow build above).
# Scans with Ozone encryption are also slower.
SLOW_SCAN_EXTRA_DELAY_MS = 10000
if IS_S3 or IS_ADLS or IS_ISILON or (IS_OZONE and IS_ENCRYPTED):
DELAY_MS += SLOW_SCAN_EXTRA_DELAY_MS
@pytest.mark.execute_serially
@CustomClusterTestSuite.with_args(
"--stress_datastream_recvr_delay_ms={0}".format(DELAY_MS)
+ " --datastream_sender_timeout_ms=1"
+ " --impala_slow_rpc_threshold_ms=500")
def test_exchange_large_delay_zero_rows(self, vector):
"""Test the special case when no batches are sent and the EOS message times out."""
self.run_test_case('QueryTest/exchange-delays-zero-rows', vector)