File tree Expand file tree Collapse file tree
cipherstash-proxy-integration/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77/// - Blocked backend connections don't affect other proxy connections
88#[ cfg( test) ]
99mod tests {
10- use crate :: common:: { connect_with_tls, PROXY , PG_PORT } ;
10+ use crate :: common:: { connect_with_tls, PG_PORT , PROXY } ;
1111 use std:: sync:: Arc ;
1212 use std:: time:: Instant ;
1313 use tokio:: sync:: Notify ;
@@ -27,10 +27,7 @@ mod tests {
2727
2828 // Connection A: run a slow query
2929 let a_handle = tokio:: spawn ( async move {
30- client_a
31- . simple_query ( "SELECT pg_sleep(5)" )
32- . await
33- . unwrap ( ) ;
30+ client_a. simple_query ( "SELECT pg_sleep(5)" ) . await . unwrap ( ) ;
3431 } ) ;
3532
3633 // Brief pause to ensure A's query is in flight
@@ -89,10 +86,7 @@ mod tests {
8986 for _ in 0 ..5 {
9087 join_set. spawn ( async {
9188 let client = connect_with_tls ( PROXY ) . await ;
92- client
93- . simple_query ( "SELECT pg_sleep(3)" )
94- . await
95- . unwrap ( ) ;
89+ client. simple_query ( "SELECT pg_sleep(3)" ) . await . unwrap ( ) ;
9690 } ) ;
9791 }
9892
Original file line number Diff line number Diff line change @@ -117,10 +117,7 @@ mod tests {
117117 #[ test]
118118 fn connection_timeout_defaults_to_120_seconds ( ) {
119119 let config = DatabaseConfig :: for_testing ( ) ;
120- assert_eq ! (
121- config. connection_timeout( ) ,
122- Some ( Duration :: from_secs( 120 ) )
123- ) ;
120+ assert_eq ! ( config. connection_timeout( ) , Some ( Duration :: from_secs( 120 ) ) ) ;
124121 }
125122
126123 #[ test]
Original file line number Diff line number Diff line change @@ -53,9 +53,7 @@ pub trait PostgreSqlErrorHandler {
5353 Error :: Encrypt ( EncryptError :: UnknownKeysetIdentifier { .. } ) => {
5454 ErrorResponse :: system_error ( err. to_string ( ) )
5555 }
56- Error :: ConnectionTimeout { .. } => {
57- ErrorResponse :: connection_timeout ( err. to_string ( ) )
58- }
56+ Error :: ConnectionTimeout { .. } => ErrorResponse :: connection_timeout ( err. to_string ( ) ) ,
5957 _ => ErrorResponse :: system_error ( err. to_string ( ) ) ,
6058 }
6159 }
You can’t perform that action at this time.
0 commit comments