Skip to content
This repository
Browse code

update version of node-pool closes gh #223

added integration test to catch any future regressions
  • Loading branch information...
commit 8b9e97f5b93585defec94c3ba16375fefb8fde8f 1 parent 128975e
Brian C authored
13 index.js
... ... @@ -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 +})
4 package.json
... ... @@ -1,5 +1,5 @@
1 1 { "name": "pg",
2   - "version": "0.8.8",
  2 + "version": "0.9.0",
3 3 "description": "PostgreSQL client - pure javascript & libpq with the same API",
4 4 "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
5 5 "homepage": "http://github.com/brianc/node-postgres",
@@ -10,7 +10,7 @@
10 10 "author" : "Brian Carlson <brian.m.carlson@gmail.com>",
11 11 "main" : "./lib",
12 12 "dependencies" : {
13   - "generic-pool" : "1.0.12"
  13 + "generic-pool" : "2.0.2"
14 14 },
15 15 "scripts" : {
16 16 "test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",
5 test/integration/client/api-tests.js
@@ -16,6 +16,11 @@ var sink = new helper.Sink(5, 10000, function() {
16 16
17 17 test('api', function() {
18 18 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 + });
19 24 pg.connect(helper.config, assert.calls(function(err, client) {
20 25 assert.equal(err, null, "Failed to connect: " + helper.sys.inspect(err));
21 26

0 comments on commit 8b9e97f

Please sign in to comment.
Something went wrong with that request. Please try again.