chore: grpc-timeput = 10s (#1934)

* chore: grpc-timeput = 10s

* chore: fix ut
This commit is contained in:
JeremyHi
2023-07-11 15:07:18 +08:00
committed by GitHub
parent 2d30f4c373
commit e1ca454992
+4 -3
View File
@@ -28,7 +28,8 @@ use tower::make::MakeConnection;
use crate::error::{CreateChannelSnafu, InvalidConfigFilePathSnafu, InvalidTlsConfigSnafu, Result};
const RECYCLE_CHANNEL_INTERVAL_SECS: u64 = 60;
const DEFAULT_REQUEST_TIMEOUT_SECS: u64 = 2;
const DEFAULT_REQUEST_TIMEOUT_SECS: u64 = 10;
const DEFAULT_CONNECT_TIMEOUT_SECS: u64 = 10;
#[derive(Clone, Debug)]
pub struct ChannelManager {
@@ -238,7 +239,7 @@ impl Default for ChannelConfig {
fn default() -> Self {
Self {
timeout: Some(Duration::from_secs(DEFAULT_REQUEST_TIMEOUT_SECS)),
connect_timeout: Some(Duration::from_secs(4)),
connect_timeout: Some(Duration::from_secs(DEFAULT_CONNECT_TIMEOUT_SECS)),
concurrency_limit: None,
rate_limit: None,
initial_stream_window_size: None,
@@ -499,7 +500,7 @@ mod tests {
assert_eq!(
ChannelConfig {
timeout: Some(Duration::from_secs(DEFAULT_REQUEST_TIMEOUT_SECS)),
connect_timeout: Some(Duration::from_secs(4)),
connect_timeout: Some(Duration::from_secs(DEFAULT_CONNECT_TIMEOUT_SECS)),
concurrency_limit: None,
rate_limit: None,
initial_stream_window_size: None,