IT: fix MonotonicTimestampGenerator test and remove C++ timestamp generator#425
Draft
dkropachev wants to merge 2 commits intomasterfrom
Draft
IT: fix MonotonicTimestampGenerator test and remove C++ timestamp generator#425dkropachev wants to merge 2 commits intomasterfrom
dkropachev wants to merge 2 commits intomasterfrom
Conversation
…erator
The MonotonicTimestampGenerator integration test was disabled because it
relied on C++ internal classes from src/timestamp_generator.{cpp,hpp} to
capture generated timestamps. Since timestamp generation is now handled
entirely on the Rust side, the test needs a Rust-side testing utility.
This commit:
- Adds RecordingTimestampGenerator in Rust that wraps MonotonicTimestampGenerator
and records all generated timestamps (behind cfg(cpp_integration_testing))
- Exposes testing_timestamp_gen_monotonic_new() and
testing_timestamp_gen_contains_timestamp() FFI functions for the test
- Rewrites the C++ test to use the new testing API
- Removes src/timestamp_generator.{cpp,hpp} (no longer needed)
- Enables the previously disabled test in both Scylla and Cassandra filters
Fixes: #296
The struct and its methods only need crate-level visibility since the module itself is pub(crate). Using pub triggers the unnameable_types lint.
923201e to
87ab850
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RecordingTimestampGeneratoron the Rust side (behindcfg(cpp_integration_testing)) that wrapsMonotonicTimestampGeneratorand records all generated timestampstesting_timestamp_gen_monotonic_new()andtesting_timestamp_gen_contains_timestamp()FFI functions for the C++ integration testMonotonicTimestampGeneratortest to use the new Rust-side testing API instead of C++ internalssrc/timestamp_generator.{cpp,hpp}which are no longer neededFixes #296