Make tests a bit more robusto

This commit is contained in:
Brian M. Carlson
2014-09-15 20:56:34 -04:00
parent 33f6ecc11b
commit d6eab36b66
3 changed files with 6 additions and 6 deletions
+1 -3
View File
@@ -70,7 +70,7 @@ testLeak(5)
var testInternalPostgresError = function() {
var fromClient = client()
// This attempts to make an array that's too large, and should fail.
var txt = "COPY (SELECT array_agg(e) FROM (SELECT generate_series(1, 100000000) AS e) t) TO STDOUT"
var txt = "COPY (SELECT asdlfsdf AS e) t) TO STDOUT"
var runStream = function(callback) {
var stream = fromClient.query(copy(txt))
@@ -82,8 +82,6 @@ var testInternalPostgresError = function() {
runStream(function(err) {
assert.notEqual(err, null)
expectedMessage = 'invalid memory alloc request size'
assert.notEqual(err.toString().indexOf(expectedMessage), -1, 'Error message should mention memory alloc request size.')
fromClient.end()
})
}