1#![crate_name = "r2d2_arangors"]
2
3pub mod pool;
4
5#[cfg(test)]
6mod tests {
7 use crate::pool::ArangoDBConnectionManager;
8 use std::time::Duration;
9 #[test]
10 #[should_panic]
11 fn connect() {
12 let m = ArangoDBConnectionManager::new("http://server:8529/", "root", "password", true);
13 let pool = r2d2::Pool::builder()
14 .max_size(10)
15 .connection_timeout(Duration::new(10, 0))
16 .build(m)
17 .expect("Connection failed");
18
19 let c = pool.get();
20
21 match c {
22 Ok(_) => println!("Valid"),
23 Err(e) => println!("{}", e),
24 }
25 }
26}