From 4414f1e2e1894ac84acc077a4a9898b7619f0a5a Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:53:40 +0100 Subject: [PATCH] app/victoria-metrics: fixes flaky e2e graphite test This commit fixes flaky test TestWriteRead/read/graphite/subquery-aggregation in app/victoria-metrics/main_test.go The test fails when the test execution falls on the first second of a minute, for example 6:59:00. In all other cases (such as 6:59:01) the test passes. The test fails because of the way VictoriaMetrics implements sub-queries: it aligns the time range to the step. The test config does not account for this. Assuming that the implementation is correct, the fix is to adjust the test config so that the data is inserted at intervals other than 1m. Signed-off-by: Artem Fetishev --- .../testdata/graphite/subquery-aggregation.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/victoria-metrics/testdata/graphite/subquery-aggregation.json b/app/victoria-metrics/testdata/graphite/subquery-aggregation.json index 64436ac95..40ff786c2 100644 --- a/app/victoria-metrics/testdata/graphite/subquery-aggregation.json +++ b/app/victoria-metrics/testdata/graphite/subquery-aggregation.json @@ -2,10 +2,10 @@ "name": "subquery-aggregation", "issue": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/184", "data": [ - "forms_daily_count;item=x 1 {TIME_S-1m}", - "forms_daily_count;item=x 2 {TIME_S-2m}", - "forms_daily_count;item=y 3 {TIME_S-1m}", - "forms_daily_count;item=y 4 {TIME_S-2m}"], + "forms_daily_count;item=x 1 {TIME_S-59s}", + "forms_daily_count;item=x 2 {TIME_S-1m59s}", + "forms_daily_count;item=y 3 {TIME_S-59s}", + "forms_daily_count;item=y 4 {TIME_S-1m59s}"], "query": ["/api/v1/query?query=min%20by%20(item)%20(min_over_time(forms_daily_count[10m:1m]))&time={TIME_S-1m}&latency_offset=1ms"], "result_query": { "status":"success",