Skip to content

Commit

Permalink
update version of node-pool closes gh #223
Browse files Browse the repository at this point in the history
added integration test to catch any future regressions
  • Loading branch information
brianc committed Dec 4, 2012
1 parent 128975e commit 8b9e97f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
13 changes: 13 additions & 0 deletions index.js
@@ -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')
})
4 changes: 2 additions & 2 deletions package.json
@@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions test/integration/client/api-tests.js
Expand Up @@ -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));


Expand Down

0 comments on commit 8b9e97f

Please sign in to comment.