mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Cover tmp_policy
This commit is contained in:
parent
88bfb788a9
commit
c9cc1ef516
0
dbms/tests/integration/test_tmp_policy/__init__.py
Normal file
0
dbms/tests/integration/test_tmp_policy/__init__.py
Normal file
@ -0,0 +1,25 @@
|
||||
<yandex>
|
||||
<storage_configuration>
|
||||
<disks>
|
||||
<disk1>
|
||||
<path>/disk1/</path>
|
||||
</disk1>
|
||||
<disk2>
|
||||
<path>/disk2/</path>
|
||||
</disk2>
|
||||
</disks>
|
||||
|
||||
<policies>
|
||||
<tmp>
|
||||
<volumes>
|
||||
<main>
|
||||
<disk>disk1</disk>
|
||||
<disk>disk2</disk>
|
||||
</main>
|
||||
</volumes>
|
||||
</tmp>
|
||||
</policies>
|
||||
</storage_configuration>
|
||||
|
||||
<tmp_policy>tmp</tmp_policy>
|
||||
</yandex>
|
34
dbms/tests/integration/test_tmp_policy/test.py
Normal file
34
dbms/tests/integration/test_tmp_policy/test.py
Normal file
@ -0,0 +1,34 @@
|
||||
# pylint: disable=unused-argument
|
||||
# pylint: disable=redefined-outer-name
|
||||
|
||||
import pytest
|
||||
|
||||
from helpers.cluster import ClickHouseCluster
|
||||
|
||||
cluster = ClickHouseCluster(__file__)
|
||||
|
||||
node = cluster.add_instance('node',
|
||||
config_dir='configs',
|
||||
tmpfs=['/disk1:size=100M', '/disk2:size=100M'])
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def start_cluster():
|
||||
try:
|
||||
cluster.start()
|
||||
yield cluster
|
||||
finally:
|
||||
cluster.shutdown()
|
||||
|
||||
def test_different_versions(start_cluster):
|
||||
query = 'SELECT count(ignore(*)) FROM (SELECT * FROM system.numbers LIMIT 1e7) GROUP BY number'
|
||||
settings = {
|
||||
'max_bytes_before_external_group_by': 1<<20,
|
||||
'max_bytes_before_external_sort': 1<<20,
|
||||
}
|
||||
|
||||
assert node.contains_in_log('Setting up /disk1/ to store temporary data in it')
|
||||
assert node.contains_in_log('Setting up /disk2/ to store temporary data in it')
|
||||
|
||||
node.query(query, settings=settings)
|
||||
assert node.contains_in_log('Writing part of aggregation data into temporary file /disk1/')
|
||||
assert node.contains_in_log('Writing part of aggregation data into temporary file /disk2/')
|
Loading…
Reference in New Issue
Block a user