diff --git a/test/integration/client/no-datat-tests.js b/test/integration/client/no-datat-tests.js index b5f7a8f4..96902968 100644 --- a/test/integration/client/no-datat-tests.js +++ b/test/integration/client/no-datat-tests.js @@ -1,7 +1,7 @@ var helper = require(__dirname + '/test-helper'); test("noData message handling", function() { - return false; + var client = helper.client(); client.query({ @@ -19,22 +19,17 @@ test("noData message handling", function() { name: 'insert', values: [101] }); - - client.connection.on('message', console.log); - - var x = client.query({ - name: 'fetch', - text: 'select size from boom' - }); - - assert.raises(x, 'row', function(row) { - assert.equal(row.fields[0], 100); - - assert.raises(x, 'row', function(row) { - assert.equal(row.fields[0], 101); - }); - }); - x.on('end', query.end()); + var query = client.query({ + name: 'fetch', + text: 'select size from boom where size < $1', + values: [101] + }); + + assert.raises(query, 'row', function(row) { + assert.strictEqual(row.fields[0],100) + }); + + client.on('drain', client.end.bind(client)); });