risingwave_common::util::epoch

Function test_epoch

source
pub const fn test_epoch(value_millis: u64) -> u64
Expand description

As most unit tests initialize a new epoch from a random value (e.g. 1, 2, 233 etc.), but the correct epoch in the system is a u64 with the last EPOCH_AVAILABLE_BITS bits set to 0. This method is to turn a a random epoch into a well shifted value.