diff --git a/package.json b/package.json index 8acf5b9..e8ae097 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/brianc/node-pg-native", "dependencies": { - "libpq": "^1.4.2", + "libpq": "^1.5.0", "pg-types": "1.6.0", "readable-stream": "1.0.31" }, diff --git a/test/many-connections.js b/test/many-connections.js index 1ac72cd..0440a6a 100644 --- a/test/many-connections.js +++ b/test/many-connections.js @@ -1,19 +1,22 @@ var Client = require('../'); var async = require('async'); var ok = require('okay'); +var bytes = require('crypto').pseudoRandomBytes describe('many connections', function() { describe('async', function() { var test = function(count, times) { it('connecting ' + count + ' clients ' + times, function(done) { - this.timeout(10000); + this.timeout(200000); var connectClient = function(n, cb) { var client = new Client(); client.connect(ok(cb, function() { - client.query('SELECT NOW()', ok(cb, function() { - client.end(cb); + bytes(1000, ok(cb, function(chunk) { + client.query('SELECT $1::text as txt', [chunk.toString('base64')], ok(cb, function(rows) { + client.end(cb); + })); })); })); } @@ -33,6 +36,7 @@ describe('many connections', function() { test(5, 5); test(5, 5); test(5, 5); + test(5, 5); test(10, 10); test(10, 10); test(10, 10);