@@ -6,6 +6,7 @@ mod tests {
66 fn run_test < F : Future > ( future : F ) -> F :: Output {
77 async_std:: task:: block_on ( future)
88 }
9+
910 #[ cfg( feature = "tokio-runtime" ) ]
1011 fn run_test < F : Future > ( future : F ) -> F :: Output {
1112 let rt = tokio:: runtime:: Runtime :: new ( ) . unwrap ( ) ;
@@ -22,8 +23,10 @@ mod tests {
2223 lazy_static ! {
2324 static ref HOST : String = env:: var( "HOST" ) . unwrap_or_else( |_| "127.0.0.1" . to_string( ) ) ;
2425 static ref PORT : String = env:: var( "PORT" ) . unwrap_or_else( |_| "27017" . to_string( ) ) ;
25- static ref DATABASE : String = env:: var( "DATABASE" ) . unwrap_or_else( |_| "db_name" . to_string( ) ) ;
26- static ref COLLECTION : String = env:: var( "COLLECTION" ) . unwrap_or_else( |_| "collection" . to_string( ) ) ;
26+ static ref DATABASE : String =
27+ env:: var( "DATABASE" ) . unwrap_or_else( |_| "db_name" . to_string( ) ) ;
28+ static ref COLLECTION : String =
29+ env:: var( "COLLECTION" ) . unwrap_or_else( |_| "collection" . to_string( ) ) ;
2730 static ref CONNECTION_STRING : String =
2831 format!( "mongodb://{}:{}/" , HOST . as_str( ) , PORT . as_str( ) ) ;
2932 }
@@ -38,7 +41,7 @@ mod tests {
3841 Ok ( c) => c,
3942 Err ( e) => panic ! ( "Client Creation Failed: {}" , e) ,
4043 } ;
41-
44+
4245 let store = MongodbSessionStore :: from_client ( client, & DATABASE , & COLLECTION ) ;
4346 let mut rng = rand:: thread_rng ( ) ;
4447 let n2: u16 = rng. gen ( ) ;
0 commit comments