Skip to content

Commit 8b9e97f

Browse files
committed
update version of node-pool closes gh brianc#223
added integration test to catch any future regressions
1 parent 128975e commit 8b9e97f

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
var pg = require('./lib')
2+
3+
var Client = pg.Client;
4+
5+
pg.connect('pg://localhost/postgres', function(err, client) {
6+
console.log(err)
7+
})
8+
9+
10+
new Client({database: 'postgres'}).connect(function(err) {
11+
console.log(err);
12+
console.log('connected')
13+
})

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ "name": "pg",
2-
"version": "0.8.8",
2+
"version": "0.9.0",
33
"description": "PostgreSQL client - pure javascript & libpq with the same API",
44
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
55
"homepage": "http://github.com/brianc/node-postgres",
@@ -10,7 +10,7 @@
1010
"author" : "Brian Carlson <brian.m.carlson@gmail.com>",
1111
"main" : "./lib",
1212
"dependencies" : {
13-
"generic-pool" : "1.0.12"
13+
"generic-pool" : "2.0.2"
1414
},
1515
"scripts" : {
1616
"test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",

test/integration/client/api-tests.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ var sink = new helper.Sink(5, 10000, function() {
1616

1717
test('api', function() {
1818
log("connecting to %j", helper.config)
19+
//test weird callback behavior with node-pool
20+
pg.connect(helper.config, function(err) {
21+
assert.isNull(err);
22+
arguments[1].emit('drain');
23+
});
1924
pg.connect(helper.config, assert.calls(function(err, client) {
2025
assert.equal(err, null, "Failed to connect: " + helper.sys.inspect(err));
2126

0 commit comments

Comments
 (0)