[CORE-14434] rptest: Fix timequery test#28428
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a failing timequery test by updating the base timestamp used for generating test records. The test was using a hardcoded timestamp from 2022 (1664453149000), which is now old enough that Redpanda's retention policy would delete the data while the test is running, causing test failures. The fix changes to using the current system time as the base timestamp.
- Changed hardcoded old timestamp to dynamically generated current timestamp using
int(time.time()) * 1000
| @ducktape_cluster(num_nodes=7) | ||
| def test_timequery(self): | ||
| base_ts = 1664453149000 | ||
| base_ts = int(time.time()) * 1000 |
There was a problem hiding this comment.
There are a lot more base_ts = 1664453149000 in this file, do more sites need to be amended?
There was a problem hiding this comment.
at this point I think a base class with one accessible self.base_ts definition might be more ideal but I don't feel strongly about you changing it for this PR.
243c952 to
2bed837
Compare
CI test resultstest results on build#75855
test results on build#76111
test results on build#76127
|
| @ducktape_cluster(num_nodes=7) | ||
| def test_timequery(self): | ||
| base_ts = 1664453149000 | ||
| base_ts = int(time.time()) * 1000 |
There was a problem hiding this comment.
at this point I think a base class with one accessible self.base_ts definition might be more ideal but I don't feel strongly about you changing it for this PR.
2bed837 to
c9e415a
Compare
The test uses constant timestamp to generate records and query them. But the timestamp is too old so retention policy starts to remove data while the test is running. This commit makes the test use proper base timestamp. Signed-off-by: Evgeny Lazin <[email protected]>
c9e415a to
033ca19
Compare
|
/ci-repeat 5 |
|
/backport v25.3.x |
|
/backport v25.2.x |
|
/backport v25.1.x |
|
/backport v24.3.x |
|
Branch name "v25.3.x" not found. |
The test uses constant timestamp to generate records and query them. But the timestamp is too old so retention policy starts to remove data while the test is running. This commit makes the test use proper base timestamp.
Backports Required
Release Notes