From 8e4dcddad62ac9f70933a8d61ab02c9c687e0c4e Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Thu, 8 Sep 2022 12:18:06 +0300 Subject: [PATCH] Make the copy_memory_usage test less flaky Increase the failure threshold. --- test/expected/copy_memory_usage.out | 6 +++--- test/sql/copy_memory_usage.sql | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/expected/copy_memory_usage.out b/test/expected/copy_memory_usage.out index 9d984d22b..6bd5ca450 100644 --- a/test/expected/copy_memory_usage.out +++ b/test/expected/copy_memory_usage.out @@ -51,11 +51,11 @@ select count(*) from portal_memory_log; (1 row) -- We'll only compare the biggest runs, because the smaller ones have variance --- due to new chunks being created and other unknown reasons. Allow 5% change of +-- due to new chunks being created and other unknown reasons. Allow 10% change of -- memory usage to account for some randomness. select * from portal_memory_log where ( - select (max(bytes) - min(bytes)) / max(bytes)::float > 0.05 - from portal_memory_log where id >= 4 + select (max(bytes) - min(bytes)) / max(bytes)::float > 0.1 + from portal_memory_log where id >= 3 ); id | bytes ----+------- diff --git a/test/sql/copy_memory_usage.sql b/test/sql/copy_memory_usage.sql index 209b1cb93..b0173fdeb 100644 --- a/test/sql/copy_memory_usage.sql +++ b/test/sql/copy_memory_usage.sql @@ -51,9 +51,9 @@ set timescaledb.max_cached_chunks_per_hypertable = 3; select count(*) from portal_memory_log; -- We'll only compare the biggest runs, because the smaller ones have variance --- due to new chunks being created and other unknown reasons. Allow 5% change of +-- due to new chunks being created and other unknown reasons. Allow 10% change of -- memory usage to account for some randomness. select * from portal_memory_log where ( - select (max(bytes) - min(bytes)) / max(bytes)::float > 0.05 - from portal_memory_log where id >= 4 -); \ No newline at end of file + select (max(bytes) - min(bytes)) / max(bytes)::float > 0.1 + from portal_memory_log where id >= 3 +);