Skip to content

Commit aa53908

Browse files
committed
updating tests to use fewer connections and up timeout for slower machines
1 parent 381598d commit aa53908

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/integration/client/type-coercion-tests.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
var helper = require(__dirname + '/test-helper');
22

3-
3+
var client = helper.client();
4+
client.on('drain', client.end.bind(client));
45
var testForTypeCoercion = function(type){
6+
client.query("create temp table test_type(col " + type.name + ")");
7+
58
test("Coerces " + type.name, function() {
69
type.values.forEach(function(val) {
710

8-
var client = helper.client();
9-
10-
client.query("create temp table test_type(col " + type.name + ")");
11-
client.on('drain', client.end.bind(client));
12-
1311
var insertQuery = client.query({
1412
name: 'insert type test ' + type.name,
1513
text: 'insert into test_type(col) VALUES($1)',
@@ -30,6 +28,8 @@ var testForTypeCoercion = function(type){
3028
text: 'delete from test_type'
3129
});
3230
});
31+
32+
client.query('drop table test_type');
3333
});
3434
};
3535

test/test-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ assert.emits = function(item, eventName, callback) {
2323
test("Should have called " + eventName, function() {
2424
assert.ok(called, "Expected '" + eventName + "' to be called.")
2525
});
26-
},1000);
26+
},10000);
2727

2828
item.once(eventName, function() {
2929
called = true;

0 commit comments

Comments
 (0)