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

Function test_pool_stats

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

Source from the content-addressed store, hash-verified

394
395 #[tokio::test]
396 async fn test_pool_stats() {
397 let pool = SqlitePool::new_with_size(":memory:", 3).unwrap();
398
399 let _conn1 = pool.acquire().await.unwrap();
400 let _conn2 = pool.acquire().await.unwrap();
401
402 let stats = pool.get_stats();
403 assert!(stats.active_connections >= 2);
404 assert!(stats.connections_created > 0);
405 }
406
407 #[tokio::test]
408 async fn test_connection_timeout_and_cleanup() {

Callers

nothing calls this directly

Calls 2

acquireMethod · 0.80
get_statsMethod · 0.45

Tested by

no test coverage detected