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 <rtm@victoriametrics.com>
This commit is contained in:
Artem Fetishev 2024-10-31 19:53:40 +01:00 committed by GitHub
parent 06621995bd
commit 4414f1e2e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,10 +2,10 @@
"name": "subquery-aggregation", "name": "subquery-aggregation",
"issue": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/184", "issue": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/184",
"data": [ "data": [
"forms_daily_count;item=x 1 {TIME_S-1m}", "forms_daily_count;item=x 1 {TIME_S-59s}",
"forms_daily_count;item=x 2 {TIME_S-2m}", "forms_daily_count;item=x 2 {TIME_S-1m59s}",
"forms_daily_count;item=y 3 {TIME_S-1m}", "forms_daily_count;item=y 3 {TIME_S-59s}",
"forms_daily_count;item=y 4 {TIME_S-2m}"], "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"], "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": { "result_query": {
"status":"success", "status":"success",