File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3478,13 +3478,28 @@ mod tests {
34783478 }
34793479
34803480 #[ test]
3481+ #[ cfg( windows) ]
3482+ #[ should_panic(
3483+ expected = "internal error: entered unreachable code: ScanAlreadyRunning { \
3484+ cross_scan_cause_opt: None, started_at: SystemTime { intervals: 116444736000000000 } } \
3485+ should be impossible with PendingPayableScanner in automatic mode"
3486+ ) ]
3487+ fn initial_pending_payable_scan_hits_unexpected_error ( ) {
3488+ test_initial_pending_payable_scan_hits_unexpected_error ( )
3489+ }
3490+
3491+ #[ test]
3492+ #[ cfg( not( windows) ) ]
34813493 #[ should_panic(
34823494 expected = "internal error: entered unreachable code: ScanAlreadyRunning { \
34833495 cross_scan_cause_opt: None, started_at: SystemTime { tv_sec: 0, tv_nsec: 0 } } \
34843496 should be impossible with PendingPayableScanner in automatic mode"
34853497 ) ]
34863498 fn initial_pending_payable_scan_hits_unexpected_error ( ) {
3487- init_test_logging ( ) ;
3499+ test_initial_pending_payable_scan_hits_unexpected_error ( )
3500+ }
3501+
3502+ fn test_initial_pending_payable_scan_hits_unexpected_error ( ) {
34883503 let mut subject = AccountantBuilder :: default ( )
34893504 . consuming_wallet ( make_wallet ( "abc" ) )
34903505 . build ( ) ;
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ impl NewPayableScanDynIntervalComputer for NewPayableScanDynIntervalComputerReal
187187 . duration_since ( last_new_payable_scan_timestamp)
188188 . unwrap_or_else ( |_| {
189189 panic ! (
190- "Unexpected now ({:?}) earlier than past timestamp ({:?})" ,
190+ "Now ({:?}) earlier than past timestamp ({:?})" ,
191191 now, last_new_payable_scan_timestamp
192192 )
193193 } ) ;
@@ -515,11 +515,26 @@ mod tests {
515515 }
516516
517517 #[ test]
518+ #[ cfg( windows) ]
518519 #[ should_panic(
519- expected = "Unexpected now (SystemTime { tv_sec: 999999, tv_nsec: 0 }) earlier than past \
520- timestamp (SystemTime { tv_sec: 1000000, tv_nsec: 0 })"
520+ expected = "Now (SystemTime { intervals: 116454735990000000 }) earlier than past timestamp \
521+ (SystemTime { intervals: 116454736000000000 })"
521522 ) ]
522523 fn scan_dyn_interval_computer_panics ( ) {
524+ test_scan_dyn_interval_computer_panics ( )
525+ }
526+
527+ #[ test]
528+ #[ cfg( not( windows) ) ]
529+ #[ should_panic(
530+ expected = "Now (SystemTime { tv_sec: 999999, tv_nsec: 0 }) earlier than past timestamp \
531+ (SystemTime { tv_sec: 1000000, tv_nsec: 0 })"
532+ ) ]
533+ fn scan_dyn_interval_computer_panics ( ) {
534+ test_scan_dyn_interval_computer_panics ( )
535+ }
536+
537+ fn test_scan_dyn_interval_computer_panics ( ) {
523538 let now = UNIX_EPOCH
524539 . checked_add ( Duration :: from_secs ( 1_000_000 ) )
525540 . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments