@@ -70,6 +70,8 @@ impl CacheEntry {
7070
7171#[ cfg( test) ]
7272mod tests {
73+ use crate :: domains:: query_io:: SERDE_CONFIG ;
74+
7375 use super :: * ;
7476 use bincode:: { decode_from_slice, encode_to_vec} ;
7577 use chrono:: { DateTime , Utc } ;
@@ -82,10 +84,10 @@ mod tests {
8284 let original_value = CacheValue :: new ( "test_value" ) . with_expiry ( expiry_time) ;
8385
8486 // WHEN
85- let encoded = encode_to_vec ( & original_value, bincode :: config :: standard ( ) ) . unwrap ( ) ;
87+ let encoded = encode_to_vec ( & original_value, SERDE_CONFIG ) . unwrap ( ) ;
8688
8789 let ( decoded_value, _) : ( CacheValue , usize ) =
88- decode_from_slice ( & encoded, bincode :: config :: standard ( ) ) . unwrap ( ) ;
90+ decode_from_slice ( & encoded, SERDE_CONFIG ) . unwrap ( ) ;
8991
9092 // THEN - Verify the decoded value matches the original
9193 assert_eq ! ( decoded_value. value, original_value. value) ;
@@ -99,11 +101,11 @@ mod tests {
99101 let original_value = CacheValue :: new ( "test_value_no_expiry" ) ;
100102
101103 // Encode the value
102- let encoded = encode_to_vec ( & original_value, bincode :: config :: standard ( ) ) . unwrap ( ) ;
104+ let encoded = encode_to_vec ( & original_value, SERDE_CONFIG ) . unwrap ( ) ;
103105
104106 // Decode the value back
105107 let ( decoded_value, _) : ( CacheValue , usize ) =
106- decode_from_slice ( & encoded, bincode :: config :: standard ( ) ) . unwrap ( ) ;
108+ decode_from_slice ( & encoded, SERDE_CONFIG ) . unwrap ( ) ;
107109
108110 // Verify the decoded value matches the original
109111 assert_eq ! ( decoded_value. value, original_value. value) ;
@@ -120,11 +122,11 @@ mod tests {
120122 . with_expiry ( DateTime :: from_timestamp_millis ( expiry_millis) . unwrap ( ) ) ;
121123
122124 // Encode the entry
123- let encoded = encode_to_vec ( & original_entry, bincode :: config :: standard ( ) ) . unwrap ( ) ;
125+ let encoded = encode_to_vec ( & original_entry, SERDE_CONFIG ) . unwrap ( ) ;
124126
125127 // Decode the entry back
126128 let ( decoded_entry, _) : ( CacheEntry , usize ) =
127- decode_from_slice ( & encoded, bincode :: config :: standard ( ) ) . unwrap ( ) ;
129+ decode_from_slice ( & encoded, SERDE_CONFIG ) . unwrap ( ) ;
128130
129131 // Verify the decoded entry matches the original
130132 assert_eq ! ( decoded_entry. key( ) , original_entry. key( ) ) ;
0 commit comments