From a328947133d4a371303d06c5e025a44a8c28d742 Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Sat, 2 Sep 2023 14:13:17 -0500 Subject: [PATCH] updated test --- test/10.database.open.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/10.database.open.js b/test/10.database.open.js index 0a368998..76cd69d4 100644 --- a/test/10.database.open.js +++ b/test/10.database.open.js @@ -98,7 +98,7 @@ describe('new Database()', function () { const start = Date.now(); expect(() => db.exec('BEGIN EXCLUSIVE')).to.throw(Database.SqliteError).with.property('code', 'SQLITE_BUSY'); const end = Date.now(); - expect(end - start).to.be.closeTo(timeout, 700); + expect(end - start).to.be.within(timeout - 1, timeout * 2 + 100); } finally { db.close(); } @@ -106,7 +106,7 @@ describe('new Database()', function () { const blocker = this.db = new Database(util.next(), { timeout: 0x7fffffff }); blocker.exec('BEGIN EXCLUSIVE'); testTimeout(0); - testTimeout(1000); + testTimeout(400); blocker.close(); expect(() => (this.db = new Database(util.current(), { timeout: undefined }))).to.throw(TypeError); expect(() => (this.db = new Database(util.current(), { timeout: null }))).to.throw(TypeError);