add test for connection_timeout to session_builder.rs
@@ -485,6 +485,21 @@ mod tests {
assert_eq!(builder.config.keyspace_case_sensitive, false);
}
+ #[test]
+ fn connection_timeout() {
+ let mut builder = SessionBuilder::new();
+ assert_eq!(
+ builder.config.connect_timeout,
+ std::time::Duration::from_secs(5)
+ );
+
+ builder = builder.connection_timeout(std::time::Duration::from_secs(10));
+ assert_eq!(
+ builder.config.connect_timeout,
+ std::time::Duration::from_secs(10)
+ );
+ }
+
#[test]
fn all_features() {
let mut builder = SessionBuilder::new();
