From 6489647a69681a7fbc56a5b421da2e5c042eda88 Mon Sep 17 00:00:00 2001 From: Mahesh Bandara Wijerathna Date: Fri, 31 May 2024 15:51:10 +0530 Subject: [PATCH] Relax allowed timeout (GHA on macOS is slow) Co-authored-by: Matthew McEachen --- test/10.database.open.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/10.database.open.js b/test/10.database.open.js index 909de4a8..0ae25a9c 100644 --- a/test/10.database.open.js +++ b/test/10.database.open.js @@ -98,7 +98,8 @@ 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.within(timeout - 1, timeout * 3 + 100); + // GHA is slow: a 500ms timeout can take 1685ms to fail. + expect(end - start).to.be.within(timeout - 1, timeout * 3 + 250); } finally { db.close(); }