Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Feb 1, 2025
1 parent 2da4d99 commit c863f31
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkcs11/src/backend/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ impl LoginCtx {
Err(apis::Error::Ureq(
err @ (ureq::Error::Io(_)
| ureq::Error::ConnectionFailed
| ureq::Error::Timeout(_)
| ureq::Error::ConnectProxyFailed(_)),
)) => {
self.slot.clear_all_pools();
Expand Down
2 changes: 2 additions & 0 deletions pkcs11/src/config/initialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ fn slot_from_config(slot: &SlotConfig) -> Result<Slot, InitializationError> {

if let Some(max_idle_duration) = slot.connections_max_idle_duration {
builder = builder.max_idle_age(Duration::from_secs(max_idle_duration));
} else {

Check warning on line 288 in pkcs11/src/config/initialization.rs

View check run for this annotation

Codecov / codecov/patch

pkcs11/src/config/initialization.rs#L287-L288

Added lines #L287 - L288 were not covered by tests
builder = builder.max_idle_age(Duration::MAX)
}

let clear_flag = Arc::new(ArcSwap::new(Arc::new(AtomicBool::new(true))));
Expand Down
1 change: 1 addition & 0 deletions pkcs11/tests/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ static PROXY_SENDER: LazyLock<UnboundedSender<ProxyMessage>> = LazyLock::new(||
let (tx, mut rx) = unbounded_channel();
std::thread::spawn(move || {
runtime::Builder::new_current_thread()
.enable_time()
.enable_io()
.build()
.unwrap()
Expand Down

0 comments on commit c863f31

Please sign in to comment.