Skip to content

Commit

Permalink
relax timeout bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Aug 24, 2023
1 parent f0ddbc9 commit 1834cee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/10.database.open.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ describe('new Database()', function () {
const start = Date.now();
expect(() => db.exec('BEGIN EXCLUSIVE')).to.throw(Database.SqliteError).with.property('code', 'SQLITE_BUSY');
const elapsedMs = Date.now() - start;
// macOS on GitHub Actions times out after 1500ms for a 1000ms timeout.
expect(elapsedMs, JSON.stringify({ elapsedMs, timeout })).to.be.gte(timeout).and.lte(Math.max(500, timeout * 1.5));
// slow macOS boxen on GitHub Actions can time out after 1650ms for a 1000ms timeout (!!)
expect(elapsedMs, JSON.stringify({ elapsedMs, timeout })).to.be.gte(timeout).and.lt(Math.max(500, timeout * 2));
} finally {
db.close();
}
Expand Down

0 comments on commit 1834cee

Please sign in to comment.