Skip to content

Commit

Permalink
Fixes Lock test timeout assumption
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaiman committed Jan 3, 2019
1 parent a0fab42 commit 77ac934
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/lock/LockProxyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,12 @@ describe("Lock Proxy", function () {
return lockTwo.tryLock(2000, 1000);
}).then(function () {
var elapsed = Date.now() - startTime;
expect(elapsed).to.be.greaterThan(1000);
expect(elapsed).to.be.at.least(1000);
return lockOne.lock(2000);
}).then(function () {
var elapsed = Date.now() - startTime;
expect(elapsed).to.be.greaterThan(1000);
expect(elapsed).to.be.at.least(1000);
});

});

it("correctly reports lock status when unlocked", function () {
Expand All @@ -133,7 +132,6 @@ describe("Lock Proxy", function () {
});
});


it("correctly reports lock status when locked", function () {
return lockOne.lock().then(function () {
return lockOne.isLocked();
Expand Down Expand Up @@ -198,6 +196,4 @@ describe("Lock Proxy", function () {
expect(locked).to.be.false;
});
});


});

0 comments on commit 77ac934

Please sign in to comment.