mirror of https://github.com/citusdata/citus.git
Fix flakyness in columnar_memory test (#6216)
Sometimes in CI the columnar_memory test was using slightly more memory
than expected.
```diff
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
FROM columnar_test_helpers.columnar_store_memory_stats();
--[ RECORD 1 ]-
-top_growth | 1
+-[ RECORD 1 ]------------------
+top_growth | 1.0206132116232119
-- before this change, max mem usage while executing inserts was 28MB and
```
This PR changes the expectation to be slightly higher, such that this
random increase in memory usage doesn't cause a flaky test.
Failing test: https://app.circleci.com/pipelines/github/citusdata/citus/26256/workflows/c0870f66-3346-4f8d-a1d3-36dfd7c98289/jobs/743028
(cherry picked from commit 4ce17f015b
)
pull/6363/head
parent
242f40d640
commit
a3325c1146
|
@ -71,7 +71,7 @@ write_clear_outside_xact | t
|
|||
INSERT INTO t
|
||||
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
||||
FROM generate_series(1, 50000) i;
|
||||
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
||||
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.03 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
||||
FROM columnar_test_helpers.columnar_store_memory_stats();
|
||||
-[ RECORD 1 ]-
|
||||
top_growth | 1
|
||||
|
|
|
@ -73,7 +73,7 @@ INSERT INTO t
|
|||
SELECT i, 'last batch', 0 /* no need to record memusage per row */
|
||||
FROM generate_series(1, 50000) i;
|
||||
|
||||
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.02 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
||||
SELECT CASE WHEN 1.0 * TopMemoryContext / :top_post BETWEEN 0.98 AND 1.03 THEN 1 ELSE 1.0 * TopMemoryContext / :top_post END AS top_growth
|
||||
FROM columnar_test_helpers.columnar_store_memory_stats();
|
||||
|
||||
-- before this change, max mem usage while executing inserts was 28MB and
|
||||
|
|
Loading…
Reference in New Issue