Skip to content

Commit

Permalink
[eclipse-iceoryx#361] Reorder test verification
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Sep 1, 2024
1 parent 00549ea commit d488b7f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ mod dynamic_storage_posix_shared_memory {
.timeout(TIMEOUT)
.open();

assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
assert_that!(sut, is_err);
assert_that!(sut.err().unwrap(), eq DynamicStorageOpenError::InitializationNotYetFinalized);
assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ mod shared_memory_posix_shared_memory_tests {
.timeout(TIMEOUT)
.open();

assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
assert_that!(sut, is_err);
assert_that!(sut.err().unwrap(), eq SharedMemoryOpenError::InitializationNotYetFinalized);
assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
}
}
2 changes: 1 addition & 1 deletion iceoryx2-cal/tests/static_storage_trait_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,12 @@ mod static_storage {
let start = std::time::SystemTime::now();
let storage_reader = Sut::Builder::new(&storage_name).open(TIMEOUT);

assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
assert_that!(storage_reader, is_err);
assert_that!(
storage_reader.err().unwrap(), eq
StaticStorageOpenError::InitializationNotYetFinalized
);
assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ mod zero_copy_connection_posix_shared_memory_tests {
.receiver_max_borrowed_samples(1)
.create_sender(1);

assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
assert_that!(sut, is_err);
assert_that!(sut.err().unwrap(), eq ZeroCopyCreationError::InitializationNotYetFinalized);
assert_that!(start.elapsed().unwrap(), ge TIMEOUT);
}
}

0 comments on commit d488b7f

Please sign in to comment.