From 08410569c00a54fdead0cd907206397a96fa1169 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 13 Apr 2016 12:43:18 +0200 Subject: [PATCH] Actually fix the correct thing in the janitor tests --- src/test/janitor-test.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/test/janitor-test.js b/src/test/janitor-test.js index 6614b458a..b7d953d00 100644 --- a/src/test/janitor-test.js +++ b/src/test/janitor-test.js @@ -19,7 +19,7 @@ describe('janitor', function () { authCode: 'authcode-0', clientId: 'clientid-0', userId: 'userid-0', - expiresAt: Date.now() + 5000 + expiresAt: Date.now() + 60 * 60 * 1000 }; var AUTHCODE_1 = { authCode: 'authcode-1', @@ -32,22 +32,18 @@ describe('janitor', function () { accessToken: tokendb.generateToken(), identifier: tokendb.PREFIX_USER + '0', clientId: 'clientid-0', - expires: Date.now(), + expires: Date.now() + 60 * 60 * 1000, scope: '*' }; var TOKEN_1 = { accessToken: tokendb.generateToken(), identifier: tokendb.PREFIX_USER + '1', clientId: 'clientid-1', - expires: Date.now(), + expires: Date.now() - 1000, scope: '*', }; before(function (done) { - // Only now calculate the expiration, otherwise it happens when the test code gets loaded, not when this is executed - TOKEN_0.expires = Date.now() + 60 * 60 * 1000; - TOKEN_1.expires = Date.now() - 1000; - async.series([ database.initialize, database._clear,