Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
montyanderson committed Mar 19, 2019
1 parent 5aeaf04 commit 079bc0f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions lib/Cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = class Cache {

if ((Date.now() - created > maxAge) || locked) {
debug(url, 'not in cache');
debug('max age', maxAge);
// file not in cache or too old

const lock = maxAge > 0 && await redis.sadd(`cache-locks:${this.name}`, hash) === 1;
Expand Down
2 changes: 0 additions & 2 deletions test/server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ test('/serve', async () => {
});

test('/serve cache locking', async () => {
await cache.clear();

const promises = [];

for (let i = 0; i < 20; i++) {
Expand Down

0 comments on commit 079bc0f

Please sign in to comment.