MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_connection_acquisition

Function test_connection_acquisition

src/session/pool.rs:373–382  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

371
372 #[tokio::test]
373 async fn test_connection_acquisition() {
374 let pool = SqlitePool::new_with_size(":memory:", 2).unwrap();
375
376 let _conn1 = pool.acquire().await.unwrap();
377 let stats = pool.get_stats();
378 assert!(stats.active_connections > 0);
379
380 let _conn2 = pool.acquire().await.unwrap();
381 // When connections are dropped, they should return to pool
382 }
383
384 #[tokio::test]
385 async fn test_health_check() {

Callers

nothing calls this directly

Calls 2

acquireMethod · 0.80
get_statsMethod · 0.45

Tested by

no test coverage detected