File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
test/integration/connection-pool Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ var helper = require ( __dirname + '/test-helper' ) ;
2+
3+ helper . pg . defaults . poolSize = 1 ;
4+
5+ var args = {
6+ user : helper . args . user ,
7+ password : helper . args . password ,
8+ database : helper . args . database ,
9+ port : helper . args . port ,
10+ host : helper . args . host
11+ }
12+
13+ helper . pg . connect ( args , assert . calls ( function ( err , client ) {
14+ assert . isNull ( err ) ;
15+ client . iGotAccessed = true ;
16+ client . query ( "SELECT NOW()" )
17+ } ) )
18+
19+ var moreArgs = {
20+ user : helper . args . user + "2" ,
21+ host : helper . args . host ,
22+ password : helper . args . password ,
23+ database : helper . args . database ,
24+ port : helper . args . port ,
25+ zomg : true
26+ }
27+
28+ helper . pg . connect ( moreArgs , assert . calls ( function ( err , client ) {
29+ assert . isNull ( err ) ;
30+ assert . ok ( client . iGotAccessed === true )
31+ client . end ( ) ;
32+ } ) )
You can’t perform that action at this time.
0 commit comments