From 4f306d7f2ad2c30ae854889ebfd79b27c2d15809 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 3 Feb 2014 20:00:24 -0500 Subject: [PATCH] Check errors in domains integration test --- test/integration/connection/test-domains.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/integration/connection/test-domains.js b/test/integration/connection/test-domains.js index d880708f5..caa78d210 100644 --- a/test/integration/connection/test-domains.js +++ b/test/integration/connection/test-domains.js @@ -24,6 +24,7 @@ d1.run(function() { d3.run(function() { pool.getConnection(function(err, conn) { + if (err) throw err; d7.run(function() { pool.query('SELECT 2', function(err, _rows, _fields) { if (err) throw err; @@ -36,19 +37,22 @@ d1.run(function() { }); d4.run(function() { - connection.ping(function() { + connection.ping(function(err) { + if (err) throw err; throw new Error('inside domain 4'); }); }); d5.run(function() { connection.statistics(function(err, stat) { + if (err) throw err; throw new Error('inside domain 5'); }); }); d6.run(function() { pool.getConnection(function(err, conn) { + if (err) throw err; conn.release(); throw new Error('inside domain 6'); });