Fix flaky TestPrometheusIntegrationStatus.testPushDown #10778
Fix flaky TestPrometheusIntegrationStatus.testPushDown #10778ebyhr merged 2 commits intotrinodb:masterfrom
Conversation
Additionally, set http-server.http.port as 8080 in the main method.
The interval might be shorter than 15s, so it returns 1 or 2 row.
| { | ||
| // default interval on the `up` metric that Prometheus records on itself is 15 seconds, so this should only yield one row | ||
| // default interval on the `up` metric that Prometheus records on itself is about 15 seconds, so this should only yield one or two row | ||
| MaterializedResult results = computeActual("SELECT * FROM prometheus.default.up WHERE timestamp > (NOW() - INTERVAL '15' SECOND)"); |
There was a problem hiding this comment.
Can we instead create a timestamp literal in Java side and then send that as the predicate.
In the MaterializedResult then we can assert that all rows have a timestamp > the predicate (instead of counting number of rows which is inherently flaky).
There was a problem hiding this comment.
Also if we want to test pushdown happenned we should assert on the plan. Since even without pushdown the engine will filter results and we'll get filtered rows.
It's pre-existing issue though.
There was a problem hiding this comment.
Do we have some stress test results somewhere? LGTM.
There was a problem hiding this comment.
Tested locally because the failure ratio was very low (1 / 500 attempts) in my laptop. Verified 2000 passes with this fix.
Fixes #7224