-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Fix flaky tests 2 (stateless, integration) #61869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
31cd444
012431c
5cd2d26
e98d6fd
33e3d83
0afd2e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <clickhouse> | ||
| <max_server_memory_usage>2000000000</max_server_memory_usage> | ||
| <max_server_memory_usage>1500000000</max_server_memory_usage> | ||
| <allow_use_jemalloc_memory>false</allow_use_jemalloc_memory> | ||
| </clickhouse> | ||
| </clickhouse> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| import os | ||
| import pytest | ||
| import shutil | ||
| import time | ||
| import pytest | ||
| from helpers.cluster import ClickHouseCluster | ||
|
|
||
| # Tests that sizes of in-memory caches (mark / uncompressed / index mark / index uncompressed / mmapped file / query cache) can be changed | ||
|
|
@@ -101,9 +100,10 @@ def test_query_cache_size_is_runtime_configurable(start_cluster): | |
| node.query("SELECT 2 SETTINGS use_query_cache = 1, query_cache_ttl = 1") | ||
| node.query("SELECT 3 SETTINGS use_query_cache = 1, query_cache_ttl = 1") | ||
|
|
||
| res = node.query_with_retry( | ||
| time.sleep(2) | ||
|
||
| node.query("SYSTEM RELOAD ASYNCHRONOUS METRICS") | ||
| res = node.query( | ||
| "SELECT value FROM system.asynchronous_metrics WHERE metric = 'QueryCacheEntries'", | ||
| check_callback=lambda result: result == "2\n", | ||
| ) | ||
| assert res == "2\n" | ||
|
|
||
|
|
@@ -116,9 +116,10 @@ def test_query_cache_size_is_runtime_configurable(start_cluster): | |
| node.query("SYSTEM RELOAD CONFIG") | ||
|
|
||
| # check that eviction worked as expected | ||
| res = node.query_with_retry( | ||
| time.sleep(2) | ||
| node.query("SYSTEM RELOAD ASYNCHRONOUS METRICS") | ||
| res = node.query( | ||
| "SELECT value FROM system.asynchronous_metrics WHERE metric = 'QueryCacheEntries'", | ||
| check_callback=lambda result: result == "2\n", | ||
| ) | ||
| assert ( | ||
| res == "2\n" | ||
|
|
@@ -132,9 +133,10 @@ def test_query_cache_size_is_runtime_configurable(start_cluster): | |
| node.query("SELECT 4 SETTINGS use_query_cache = 1, query_cache_ttl = 1") | ||
| node.query("SELECT 5 SETTINGS use_query_cache = 1, query_cache_ttl = 1") | ||
|
|
||
| res = node.query_with_retry( | ||
| time.sleep(2) | ||
| node.query("SYSTEM RELOAD ASYNCHRONOUS METRICS") | ||
| res = node.query( | ||
| "SELECT value FROM system.asynchronous_metrics WHERE metric = 'QueryCacheEntries'", | ||
| check_callback=lambda result: result == "1\n", | ||
| ) | ||
| assert res == "1\n" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| create table test (number UInt64) engine=MergeTree order by number; | ||
| insert into test select * from numbers(100000000); | ||
| insert into test select * from numbers(50000000); | ||
| select ignore(number) from test where RAND() > 4292390314 limit 10; | ||
| select count() > 0 from test where RAND() > 4292390314; | ||
| drop table test; | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.