updating tests to use fewer connections and up timeout for slower machines

This commit is contained in:
brianc 2010-11-02 18:15:41 -05:00
parent 381598d3c0
commit aa53908e88
2 changed files with 7 additions and 7 deletions

View File

@ -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');
});
};

View File

@ -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;