update version of node-pool closes gh #223

added integration test to catch any future regressions
This commit is contained in:
brianc 2012-12-04 17:53:04 -06:00
parent 128975e6f3
commit 8b9e97f5b9
3 changed files with 20 additions and 2 deletions

13
index.js Normal file
View File

@ -0,0 +1,13 @@
var pg = require('./lib')
var Client = pg.Client;
pg.connect('pg://localhost/postgres', function(err, client) {
console.log(err)
})
new Client({database: 'postgres'}).connect(function(err) {
console.log(err);
console.log('connected')
})

View File

@ -1,5 +1,5 @@
{ "name": "pg",
"version": "0.8.8",
"version": "0.9.0",
"description": "PostgreSQL client - pure javascript & libpq with the same API",
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
"homepage": "http://github.com/brianc/node-postgres",
@ -10,7 +10,7 @@
"author" : "Brian Carlson <brian.m.carlson@gmail.com>",
"main" : "./lib",
"dependencies" : {
"generic-pool" : "1.0.12"
"generic-pool" : "2.0.2"
},
"scripts" : {
"test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",

View File

@ -16,6 +16,11 @@ var sink = new helper.Sink(5, 10000, function() {
test('api', function() {
log("connecting to %j", helper.config)
//test weird callback behavior with node-pool
pg.connect(helper.config, function(err) {
assert.isNull(err);
arguments[1].emit('drain');
});
pg.connect(helper.config, assert.calls(function(err, client) {
assert.equal(err, null, "Failed to connect: " + helper.sys.inspect(err));