Skip to content

Commit 35bca98

Browse files
committed
Fix clippy
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
1 parent b124d33 commit 35bca98

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

orion-proxy/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ parking_lot = "0.12.3"
3434
tokio.workspace = true
3535
tower.workspace = true
3636
tracing.workspace = true
37+
pingora-timeout = "0.3.0"
38+
3739

3840
axum = "0.8.1"
3941
compact_str.workspace = true

orion-proxy/src/signal.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub fn trigger_manual_shutdown(
152152
#[cfg(test)]
153153
mod tests {
154154
use super::*;
155+
use pingora_timeout::fast_timeout::fast_timeout;
155156
use std::time::Duration;
156157

157158
#[tokio::test]
@@ -163,7 +164,7 @@ mod tests {
163164
trigger_manual_shutdown(&shutdown_tx).expect("Failed to trigger manual shutdown");
164165

165166
// Should receive the shutdown signal
166-
let signal = tokio::time::timeout(Duration::from_millis(100), shutdown_rx.recv())
167+
let signal = fast_timeout(Duration::from_millis(100), shutdown_rx.recv())
167168
.await
168169
.expect("Timeout waiting for shutdown signal")
169170
.expect("Failed to receive shutdown signal");

0 commit comments

Comments
 (0)