From 3ae9d6ca184b7b7cb4b278263f7451bf35207a6a Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Mon, 9 Mar 2020 12:02:31 +0100 Subject: [PATCH] Fix flaky gapfill test The gapfill test assumed 1 day is always <= 24 hours which is not true during DST switch leading to a failing test when run in that time. This PR fixes the test to have reproducable output even when run during DST switch. --- tsl/test/expected/gapfill.out | 4 ++-- tsl/test/sql/gapfill.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tsl/test/expected/gapfill.out b/tsl/test/expected/gapfill.out index 2db5c1c16..34a4ecede 100644 --- a/tsl/test/expected/gapfill.out +++ b/tsl/test/expected/gapfill.out @@ -2026,10 +2026,10 @@ GROUP BY 1; -- time_bucket_gapfill with now() as start SELECT - time_bucket_gapfill('1d'::interval,t) + time_bucket_gapfill('1h'::interval,t) FROM (VALUES (now()),(now())) v(t) WHERE - t >= now() AND t < now() - '1d'::interval + t >= now() AND t < now() - '1h'::interval GROUP BY 1; time_bucket_gapfill --------------------- diff --git a/tsl/test/sql/gapfill.sql b/tsl/test/sql/gapfill.sql index d881cf461..e87c1f589 100644 --- a/tsl/test/sql/gapfill.sql +++ b/tsl/test/sql/gapfill.sql @@ -1239,10 +1239,10 @@ GROUP BY 1; -- time_bucket_gapfill with now() as start SELECT - time_bucket_gapfill('1d'::interval,t) + time_bucket_gapfill('1h'::interval,t) FROM (VALUES (now()),(now())) v(t) WHERE - t >= now() AND t < now() - '1d'::interval + t >= now() AND t < now() - '1h'::interval GROUP BY 1; -- time_bucket_gapfill with multiple constraints