Unverified Commit 93d96dad by Kewde Committed by GitHub

test: wait for db to unlock first.

parent 65de9a7a
......@@ -11,15 +11,18 @@ describe('each', function() {
var total = 100000;
var retrieved = 0;
db.wait(function() {
db.each('SELECT id, txt FROM foo LIMIT 0, ?', total, function(err, row) {
if (err) throw err;
retrieved++;
});
db.wait(setTimeout(function() {
db.wait(function() {
assert.equal(retrieved, total, "Only retrieved " + retrieved + " out of " + total + " rows.");
done();
}, 400));
});
});
});
it('Statement#each with complete callback', function(done) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment