Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
Showing with 20 additions and 2 deletions.
  1. +13 −0 index.js
  2. +2 −2 package.json
  3. +5 −0 test/integration/client/api-tests.js
13 index.js
View
@@ -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 package.json
View
@@ -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",
5 test/integration/client/api-tests.js
View
@@ -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));
Please sign in to comment.
Something went wrong with that request. Please try again.