mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Make test_MemoryTracking::test_http not flaky
By comparing only megabytes in the memory changes, instead of bytes as before, since it may be tricky at least due to max_untracked_memory and how thread pool handle it. It should be safe, since originally it was written in #16121 which fixes issue #15932, which has ~4MB consumption of memory per request.
This commit is contained in:
parent
56ab0e31e6
commit
d030e08d05
@ -57,6 +57,8 @@ def get_MemoryTracking():
|
||||
return int(http_query("SELECT value FROM system.metrics WHERE metric = 'MemoryTracking'"))
|
||||
|
||||
def check_memory(memory):
|
||||
# bytes -> megabytes
|
||||
memory = [*map(lambda x: int(int(x)/1024/1024), memory)]
|
||||
# 3 changes to MemoryTracking is minimum, since:
|
||||
# - this is not that high to not detect inacuracy
|
||||
# - memory can go like X/X+N due to some background allocations
|
||||
|
Loading…
Reference in New Issue
Block a user