@@ -3,7 +3,7 @@ import { Pool } from "../pool.ts";
33import { delay } from "../utils.ts" ;
44import { DEFAULT_SETUP , TEST_CONNECTION_PARAMS } from "./constants.ts" ;
55
6- function testPool (
6+ async function testPool (
77 t : ( pool : Pool ) => void | Promise < void > ,
88 setupQueries ?: Array < string > | null ,
99 lazy ?: boolean ,
@@ -63,11 +63,9 @@ testPool(
6363 await p ;
6464 assertEquals ( POOL . available , 1 ) ;
6565
66- // deno-lint-ignore camelcase
6766 const qs_thunks = [ ...Array ( 25 ) ] . map ( ( _ , i ) =>
6867 POOL . query ( "SELECT pg_sleep(0.1) is null, $1::text as id;" , i )
6968 ) ;
70- // deno-lint-ignore camelcase
7169 const qs_promises = Promise . all ( qs_thunks ) ;
7270 await delay ( 1 ) ;
7371 assertEquals ( POOL . available , 0 ) ;
@@ -103,11 +101,9 @@ testPool(async function manyQueries(POOL) {
103101 await p ;
104102 assertEquals ( POOL . available , 10 ) ;
105103
106- // deno-lint-ignore camelcase
107104 const qs_thunks = [ ...Array ( 25 ) ] . map ( ( _ , i ) =>
108105 POOL . query ( "SELECT pg_sleep(0.1) is null, $1::text as id;" , i )
109106 ) ;
110- // deno-lint-ignore camelcase
111107 const qs_promises = Promise . all ( qs_thunks ) ;
112108 await delay ( 1 ) ;
113109 assertEquals ( POOL . available , 0 ) ;
0 commit comments