update version of node-pool closes gh #223
added integration test to catch any future regressions
This commit is contained in:
parent
128975e6f3
commit
8b9e97f5b9
13
index.js
Normal file
13
index.js
Normal 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')
|
||||||
|
})
|
@ -1,5 +1,5 @@
|
|||||||
{ "name": "pg",
|
{ "name": "pg",
|
||||||
"version": "0.8.8",
|
"version": "0.9.0",
|
||||||
"description": "PostgreSQL client - pure javascript & libpq with the same API",
|
"description": "PostgreSQL client - pure javascript & libpq with the same API",
|
||||||
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
|
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
|
||||||
"homepage": "http://github.com/brianc/node-postgres",
|
"homepage": "http://github.com/brianc/node-postgres",
|
||||||
@ -10,7 +10,7 @@
|
|||||||
"author" : "Brian Carlson <brian.m.carlson@gmail.com>",
|
"author" : "Brian Carlson <brian.m.carlson@gmail.com>",
|
||||||
"main" : "./lib",
|
"main" : "./lib",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"generic-pool" : "1.0.12"
|
"generic-pool" : "2.0.2"
|
||||||
},
|
},
|
||||||
"scripts" : {
|
"scripts" : {
|
||||||
"test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",
|
"test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",
|
||||||
|
@ -16,6 +16,11 @@ var sink = new helper.Sink(5, 10000, function() {
|
|||||||
|
|
||||||
test('api', function() {
|
test('api', function() {
|
||||||
log("connecting to %j", helper.config)
|
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) {
|
pg.connect(helper.config, assert.calls(function(err, client) {
|
||||||
assert.equal(err, null, "Failed to connect: " + helper.sys.inspect(err));
|
assert.equal(err, null, "Failed to connect: " + helper.sys.inspect(err));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user