Skip to content

Commit

Permalink
Update libpq
Browse files Browse the repository at this point in the history
  • Loading branch information
brianc committed Jan 20, 2015
1 parent 467c4aa commit a60bd0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
10 changes: 7 additions & 3 deletions test/many-connections.js
Original file line number Diff line number Diff line change
@@ -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);
}));
}));
}));
}
Expand All @@ -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);
Expand Down

0 comments on commit a60bd0f

Please sign in to comment.