Skip to content

Commit

Permalink
Add lock to another test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt committed Feb 24, 2023
1 parent 8dca98c commit 91afd54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/utc_offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ fn current_local_offset() {
ignore
)]
fn local_offset_error_when_multithreaded() {
let _guard = crate::SOUNDNESS_LOCK.lock().unwrap();

std::thread::spawn(|| {
assert!(UtcOffset::current_local_offset().is_err());
})
Expand Down

0 comments on commit 91afd54

Please sign in to comment.