Skip to content

Commit

Permalink
CLOCK_MONOTONIC_RAW
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerZ committed Oct 29, 2024
1 parent 50ab981 commit d5b969e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_multi_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ async fn test_multi_thread() {

info!("Test done. Waiting for tasks to terminate");
for t in v {
t.join().ok();
t.join().unwrap();
}

info!("Stop XCP server");
Expand Down
2 changes: 1 addition & 1 deletion tests/test_single_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async fn test_single_thread() {
)
.await; // Start the test executor XCP client

t1.join().ok();
t1.join().unwrap();
xcp.stop_server();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_tokio_single_thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async fn test_tokio_single_thread() {
)
.await; // Start the test executor XCP client

t1.join().ok();
t1.join().unwrap();

std::fs::remove_file("test_tokio_single_thread.a2l").unwrap();
}
4 changes: 2 additions & 2 deletions tests/xcp_test_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pub use xcp_client::xcp_client::XCPTL_MAX_SEGMENT_SIZE;
//-----------------------------------------------------------------------------

// Logging
pub const OPTION_LOG_LEVEL: xcp::XcpLogLevel = xcp::XcpLogLevel::Debug;
pub const OPTION_XCP_LOG_LEVEL: xcp::XcpLogLevel = xcp::XcpLogLevel::Debug;
pub const OPTION_LOG_LEVEL: xcp::XcpLogLevel = xcp::XcpLogLevel::Info;
pub const OPTION_XCP_LOG_LEVEL: xcp::XcpLogLevel = xcp::XcpLogLevel::Info;

// Test parameters
pub const MULTI_THREAD_TASK_COUNT: usize = 8; // Number of threads
Expand Down
3 changes: 2 additions & 1 deletion xcp_client/src/xcp_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ impl XcpClient {
}
Err(_) => {
// Timeout, return with XcpError
warn!("xcp_command: timeout - no responce to {:?}", cmd_bytes);
Err(Box::new(XcpError::new(ERROR_CMD_TIMEOUT)) as Box<dyn Error>)
}
}
Expand Down Expand Up @@ -1375,7 +1376,7 @@ impl XcpClient {
self.task_control.running = false;
self.tx_task_control.as_ref().unwrap().send(self.task_control).await?;

// Stop the DAQ decoder (to finalize the eventual file output)
// Stop the DAQ decoder
self.daq_decoder.as_ref().unwrap().lock().stop();

res
Expand Down

0 comments on commit d5b969e

Please sign in to comment.