Skip to content

Commit 0a8b68a

Browse files
committed
Fix flaky message verification test by addressing race condition in original sending time
1 parent 8c31640 commit 0a8b68a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/hotfix/src/message/verification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ mod tests {
323323
fn test_seq_number_too_low_with_poss_dup_flag() {
324324
let config = build_test_config();
325325
let mut msg = build_test_message("FIX.4.4", "TARGET", "SENDER", 40);
326+
let sending_time: Timestamp = msg.header().get(fix44::SENDING_TIME).unwrap();
326327
msg.header_mut().set(fix44::POSS_DUP_FLAG, true);
327-
msg.header_mut()
328-
.set(fix44::ORIG_SENDING_TIME, Timestamp::utc_now());
328+
msg.header_mut().set(fix44::ORIG_SENDING_TIME, sending_time);
329329

330330
let result = verify_message(&msg, &config, Some(42));
331331

0 commit comments

Comments
 (0)