Skip to content

Commit

Permalink
improve s3 combinatoric table test xfails
Browse files Browse the repository at this point in the history
  • Loading branch information
strtgbb committed Dec 20, 2024
1 parent ec6cc94 commit c17eee4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
20 changes: 19 additions & 1 deletion s3/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,25 @@
":/table function/measure file size": [
(Fail, "Not implemented <24", check_clickhouse_version("<24"))
],
":/combinatoric table/:": [(Fail, "Unstable test")],
":/combinatoric table/:n_cols=2000:part_type=compact": [
(
Fail,
"Compact parts require too much memory with 2000 columns",
always,
".*MEMORY_LIMIT_EXCEEDED.*",
)
],
":/combinatoric table/engine=VersionedCollapsingMergeTree,replicated=True,n_cols=2000,n_tables=3,part_type=wide": [
(
Fail,
"Needs investigation, MEMORY_LIMIT_EXCEEDED",
always,
".*MEMORY_LIMIT_EXCEEDED.*",
)
],
":/combinatoric table/engine=CollapsingMergeTree,replicated=True,n_cols=500,n_tables=3,part_type=compact": [
(Fail, "Needs investigation, rows not appearing")
],
":/invalid table function/invalid region": [
(Error, "https://github.com/ClickHouse/ClickHouse/issues/59084")
],
Expand Down
15 changes: 8 additions & 7 deletions s3/tests/combinatoric_table.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
from random import choice
import random

from testflows.core import *
from testflows.combinatorics import CoveringArray
Expand Down Expand Up @@ -106,7 +106,10 @@ def check_table_combination(
nodes = self.context.ch_nodes
storage_policy = "external"
tables = []
n_rows = 10000
insert_size = 5_000_000
n_rows = insert_size // n_cols

my_random = random.Random(42)

for i in range(n_tables):
with Given(f"table#{i} created with the parameter combination"):
Expand All @@ -124,7 +127,7 @@ def check_table_combination(

for i, table in enumerate(tables):
if replicated:
insert_node = choice(nodes)
insert_node = my_random.choice(nodes)

with Given(f"data is inserted into table#{i} on {insert_node.name}"):
insert_node.query(
Expand All @@ -135,7 +138,8 @@ def check_table_combination(
1 AS ver,
* FROM generateRandom('{','.join([c.full_definition() for c in table.columns][2:])}')
LIMIT {n_rows}
"""
""",
timeout=180,
)

for node in query_nodes:
Expand Down Expand Up @@ -172,8 +176,5 @@ def feature(self, uri):
for table_config in CoveringArray(
table_configurations, strength=covering_array_strength
):
if table_config["n_cols"] > 500 and table_config["part_type"] != "unspecified":
continue

title = ",".join([f"{k}={v}" for k, v in table_config.items()])
Scenario(title, test=check_table_combination)(**table_config)

0 comments on commit c17eee4

Please sign in to comment.