-
Notifications
You must be signed in to change notification settings - Fork 702
[CORE-14434] rptest: Fix timequery test #28428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
tests/rptest/tests/timequery_test.py
Outdated
| @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
tests/rptest/tests/timequery_test.py
Outdated
| @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. test_timequery_with_local_gc seems very flakey
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 |
WillemKauf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice lgtm
|
/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