Skip to content

Commit 465a742

Browse files
committed
Fix tests
1 parent 672bc2d commit 465a742

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

src/Storages/IStorageCluster.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class ReadFromCluster : public SourceStepWithFilter
9393

9494
std::optional<RemoteQueryExecutor::Extension> extension;
9595

96-
void createExtension(const ActionsDAG::Node * predicate, size_t number_of_replicas);
96+
void createExtension(const ActionsDAG::Node * predicate);
9797
ContextPtr updateSettings(const Settings & settings);
9898
};
9999

@@ -105,14 +105,10 @@ void ReadFromCluster::applyFilters(ActionDAGNodes added_filter_nodes)
105105
if (filter_actions_dag)
106106
predicate = filter_actions_dag->getOutputs().at(0);
107107

108-
auto max_replicas_to_use = static_cast<UInt64>(cluster->getShardsInfo().size());
109-
if (context->getSettingsRef()[Setting::max_parallel_replicas] > 1)
110-
max_replicas_to_use = std::min(max_replicas_to_use, context->getSettingsRef()[Setting::max_parallel_replicas].value);
111-
112-
createExtension(predicate, max_replicas_to_use);
108+
createExtension(predicate);
113109
}
114110

115-
void ReadFromCluster::createExtension(const ActionsDAG::Node * predicate, size_t number_of_replicas)
111+
void ReadFromCluster::createExtension(const ActionsDAG::Node * predicate)
116112
{
117113
if (extension)
118114
return;

tests/integration/test_s3_cache_locality/configs/named_collections.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<test_s3>
44
<url>http://minio1:9001/root/data/*</url>
55
<access_key_id>minio</access_key_id>
6-
<secret_access_key>minio123</secret_access_key>
6+
<secret_access_key>ClickHouse_Minio_P@ssw0rd</secret_access_key>
77
<format>CSV</format>>
88
</test_s3>
99
</named_collections>

tests/integration/test_s3_cache_locality/test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import pytest
88

99
from helpers.cluster import ClickHouseCluster
10+
from helpers.config_cluster import minio_secret_key
11+
1012

1113
logging.getLogger().setLevel(logging.INFO)
1214
logging.getLogger().addHandler(logging.StreamHandler())
@@ -81,7 +83,7 @@ def check_s3_gets(cluster, node, expected_result, cluster_first, cluster_second,
8183
result_first = node.query(
8284
f"""
8385
SELECT count(*)
84-
FROM s3Cluster('{cluster_first}', 'http://minio1:9001/root/data/generated/*', 'minio', 'minio123', 'CSV', 'a String, b UInt64')
86+
FROM s3Cluster('{cluster_first}', 'http://minio1:9001/root/data/generated/*', 'minio', '{minio_secret_key}', 'CSV', 'a String, b UInt64')
8587
WHERE b=42
8688
SETTINGS
8789
enable_filesystem_cache={enable_filesystem_cache},
@@ -95,7 +97,7 @@ def check_s3_gets(cluster, node, expected_result, cluster_first, cluster_second,
9597
result_second = node.query(
9698
f"""
9799
SELECT count(*)
98-
FROM s3Cluster('{cluster_second}', 'http://minio1:9001/root/data/generated/*', 'minio', 'minio123', 'CSV', 'a String, b UInt64')
100+
FROM s3Cluster('{cluster_second}', 'http://minio1:9001/root/data/generated/*', 'minio', '{minio_secret_key}', 'CSV', 'a String, b UInt64')
99101
WHERE b=42
100102
SETTINGS
101103
enable_filesystem_cache={enable_filesystem_cache},
@@ -148,9 +150,9 @@ def test_cache_locality(started_cluster):
148150
node = started_cluster.instances["clickhouse0"]
149151

150152
expected_result = node.query(
151-
"""
153+
f"""
152154
SELECT count(*)
153-
FROM s3('http://minio1:9001/root/data/generated/*', 'minio', 'minio123', 'CSV', 'a String, b UInt64')
155+
FROM s3('http://minio1:9001/root/data/generated/*', 'minio', '{minio_secret_key}', 'CSV', 'a String, b UInt64')
154156
WHERE b=42
155157
"""
156158
)

tests/integration/test_storage_iceberg/configs/config.d/named_collections.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<s3_with_type>
1515
<url>http://minio1:9001/root/</url>
1616
<access_key_id>minio</access_key_id>
17-
<secret_access_key>minio123</secret_access_key>
17+
<secret_access_key>ClickHouse_Minio_P@ssw0rd</secret_access_key>
1818
<storage_type>s3</storage_type>
1919
</s3_with_type>
2020
<azure_with_type>

0 commit comments

Comments
 (0)