bump up timeout for tests against AWS from 5s to 15s
This commit is contained in:
parent
4c8f489956
commit
1345516117
@ -22,8 +22,10 @@ var config = {
|
|||||||
ssl: true
|
ssl: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test('uses password file when PGPASSFILE env variable is set', function() {
|
||||||
// connect & disconnect from heroku
|
// connect & disconnect from heroku
|
||||||
pg.connect(config, assert.success(function(client, done) {
|
pg.connect(config, assert.calls(function(err, client, done) {
|
||||||
|
assert.isNull(err);
|
||||||
client.query('SELECT NOW() as time', assert.success(function(res) {
|
client.query('SELECT NOW() as time', assert.success(function(res) {
|
||||||
assert(res.rows[0].time.getTime());
|
assert(res.rows[0].time.getTime());
|
||||||
|
|
||||||
@ -33,4 +35,5 @@ pg.connect(config, assert.success(function(client, done) {
|
|||||||
done();
|
done();
|
||||||
pg.end();
|
pg.end();
|
||||||
}))
|
}))
|
||||||
}));
|
}, 15000));
|
||||||
|
});
|
||||||
|
@ -15,11 +15,14 @@ var config = {
|
|||||||
ssl: true
|
ssl: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test('connection with config ssl = true', function() {
|
||||||
//connect & disconnect from heroku
|
//connect & disconnect from heroku
|
||||||
pg.connect(config, assert.success(function(client, done) {
|
pg.connect(config, assert.calls(function(err, client, done) {
|
||||||
|
assert.isNull(err);
|
||||||
client.query('SELECT NOW() as time', assert.success(function(res) {
|
client.query('SELECT NOW() as time', assert.success(function(res) {
|
||||||
assert(res.rows[0].time.getTime());
|
assert(res.rows[0].time.getTime());
|
||||||
done();
|
done();
|
||||||
pg.end();
|
pg.end();
|
||||||
}))
|
}))
|
||||||
}));
|
}, 15000));
|
||||||
|
});
|
@ -133,9 +133,10 @@ assert.lengthIs = function(actual, expectedLength) {
|
|||||||
|
|
||||||
var expect = function(callback, timeout) {
|
var expect = function(callback, timeout) {
|
||||||
var executed = false;
|
var executed = false;
|
||||||
|
timeout = timeout || 5000;
|
||||||
var id = setTimeout(function() {
|
var id = setTimeout(function() {
|
||||||
assert.ok(executed, "Expected execution of function to be fired");
|
assert.ok(executed, "Expected execution of function to be fired within " + timeout + ' milliseconds');
|
||||||
}, timeout || 5000)
|
}, timeout)
|
||||||
|
|
||||||
if(callback.length < 3) {
|
if(callback.length < 3) {
|
||||||
return function(err, queryResult) {
|
return function(err, queryResult) {
|
||||||
|
Loading…
Reference in New Issue
Block a user