mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
updating tests to use fewer connections and up timeout for slower machines
This commit is contained in:
parent
381598d3c0
commit
aa53908e88
@ -1,15 +1,13 @@
|
||||
var helper = require(__dirname + '/test-helper');
|
||||
|
||||
|
||||
var client = helper.client();
|
||||
client.on('drain', client.end.bind(client));
|
||||
var testForTypeCoercion = function(type){
|
||||
client.query("create temp table test_type(col " + type.name + ")");
|
||||
|
||||
test("Coerces " + type.name, function() {
|
||||
type.values.forEach(function(val) {
|
||||
|
||||
var client = helper.client();
|
||||
|
||||
client.query("create temp table test_type(col " + type.name + ")");
|
||||
client.on('drain', client.end.bind(client));
|
||||
|
||||
var insertQuery = client.query({
|
||||
name: 'insert type test ' + type.name,
|
||||
text: 'insert into test_type(col) VALUES($1)',
|
||||
@ -30,6 +28,8 @@ var testForTypeCoercion = function(type){
|
||||
text: 'delete from test_type'
|
||||
});
|
||||
});
|
||||
|
||||
client.query('drop table test_type');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ assert.emits = function(item, eventName, callback) {
|
||||
test("Should have called " + eventName, function() {
|
||||
assert.ok(called, "Expected '" + eventName + "' to be called.")
|
||||
});
|
||||
},1000);
|
||||
},10000);
|
||||
|
||||
item.once(eventName, function() {
|
||||
called = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user