fix tests

(cherry picked from commit ed52f463d95ac49431600f167a08507d7fcaaaf0)
This commit is contained in:
Alexander Tokmakov 2022-05-31 15:22:46 +02:00
parent f84b5a74ab
commit 153862dc31
4 changed files with 14 additions and 8 deletions

View File

@ -117,6 +117,7 @@ def get_counters(fname):
# Lines like:
# [gw0] [ 7%] ERROR test_mysql_protocol/test.py::test_golang_client
# [gw3] [ 40%] PASSED test_replicated_users/test.py::test_rename_replicated[QUOTA]
state = line_arr[-2]
test_name = line_arr[-1]
@ -941,6 +942,16 @@ class ClickhouseIntegrationTestsRunner:
if "(memory)" in self.params["context_name"]:
result_state = "success"
for res in test_result:
# It's not easy to parse output of pytest
# Especially when test names may contain spaces
# Do not allow it to avoid obscure failures
if " " not in res[0]:
continue
logging.warning("Found invalid test name with space: %s", res[0])
status_text = "Found test with invalid name, see main log"
result_state = "failure"
return result_state, status_text, test_result, []

View File

@ -16,12 +16,6 @@ import traceback
import urllib.parse
import shlex
import urllib3
from cassandra.policies import RoundRobinPolicy
import cassandra.cluster
import psycopg2
import pymongo
import meilisearch
import pymysql
import requests
try:
@ -34,6 +28,7 @@ try:
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
import pymongo
import pymysql
import meilisearch
from confluent_kafka.avro.cached_schema_registry_client import (
CachedSchemaRegistryClient,
)

View File

@ -41,7 +41,7 @@ entities = [
def get_entity_id(entity):
return entity.keyword
return entity.keyword.replace(" ", "_")
@pytest.mark.parametrize("entity", entities, ids=get_entity_id)

View File

@ -5,7 +5,7 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
DATA_FILE=$CUR_DIR/data_orc/test_null_array.orc
DATA_FILE=$CUR_DIR/data_orc/test_null_array_${CLICKHOUSE_DATABASE}.orc
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS test_null_array_orc"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE test_null_array_orc(col0 Array(Nullable(Int64)),col1 Array(Nullable(String))) ENGINE = Memory"