Fix flaky test_deinitialize in uwb_uci_rust_tests
This fixes a race condition where multiple UwbEvents CLOSE_CPLT were
sent to hal at the same time. In cases where the wrong call got executed
first, the list of expected events in mock_adaptation object weren't
properly cleared. This caused
assert!(self.expected_calls.lock().unwrap().is_empty()) implemented on
Drop to fail.
This fix removes the second unnecessary call to hal with CLOSE_CPLT since the same call will be made by calling dispatcher.send_jni_command(JNICommand::Disable(true).. after properly clearing the expected calls list.
Bug: 250003544
Test: atest libuwb_uci_rust_tests --retry-until-failure 20
Change-Id: I675519deb74b930d65f68c77a6e079cfa3c3f06c
1 file changed