Skip to content

Commit

Permalink
chore: fix for mock server race condition in test
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jun 25, 2024
1 parent ba0b16a commit 9c144dd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rust/pact_ffi/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,6 @@ fn pactffi_with_binary_file_feature_test(specification: PactSpecification, expec
.body(buffer)
.send();

let mismatches = unsafe {
CStr::from_ptr(pactffi_mock_server_mismatches(port)).to_string_lossy().into_owned()
};

println!("pactffi_with_binary_file_feature_test v{}: {}", specification, mismatches);
match result {
Ok(res) => {
Expand All @@ -710,6 +706,11 @@ fn pactffi_with_binary_file_feature_test(specification: PactSpecification, expec
};

pactffi_write_pact_file(port, file_path.as_ptr(), true);

let mismatches = unsafe {
CStr::from_ptr(pactffi_mock_server_mismatches(port)).to_string_lossy().into_owned()
};

pactffi_cleanup_mock_server(port);

expect!(mismatches).to(be_equal_to("[]"));
Expand Down

0 comments on commit 9c144dd

Please sign in to comment.