Skip to content

Commit

Permalink
updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWise committed Sep 2, 2023
1 parent 8ed0172 commit 6c99a02
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 @@ -98,15 +98,15 @@ 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, 300);
expect(end - start).to.be.closeTo(timeout, 700);
} finally {
db.close();
}
};
const blocker = this.db = new Database(util.next(), { timeout: 0x7fffffff });
blocker.exec('BEGIN EXCLUSIVE');
testTimeout(0);
testTimeout(400);
testTimeout(1000);
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);
Expand Down

0 comments on commit 6c99a02

Please sign in to comment.