Skip to content

IT: fix MonotonicTimestampGenerator test and remove C++ timestamp generator#425

Draft
dkropachev wants to merge 2 commits intomasterfrom
dk/fix-monotonic-timestamp-generator-test
Draft

IT: fix MonotonicTimestampGenerator test and remove C++ timestamp generator#425
dkropachev wants to merge 2 commits intomasterfrom
dk/fix-monotonic-timestamp-generator-test

Conversation

@dkropachev
Copy link
Contributor

Summary

  • Adds a RecordingTimestampGenerator on the Rust side (behind cfg(cpp_integration_testing)) that wraps MonotonicTimestampGenerator and records all generated timestamps
  • Exposes testing_timestamp_gen_monotonic_new() and testing_timestamp_gen_contains_timestamp() FFI functions for the C++ integration test
  • Rewrites the MonotonicTimestampGenerator test to use the new Rust-side testing API instead of C++ internals
  • Removes src/timestamp_generator.{cpp,hpp} which are no longer needed
  • Enables the previously disabled test in both Scylla and Cassandra test filters

Fixes #296

…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.
@dkropachev dkropachev force-pushed the dk/fix-monotonic-timestamp-generator-test branch from 923201e to 87ab850 Compare February 25, 2026 03:26
@wprzytula wprzytula added this to the 1.0.0 - Post release items milestone Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix MonotonicTimestampGenerator test and remove src/timestamp_generator.[cpp/hpp]

2 participants