From 87c6e0f7d7c18a8494f08f17fb35150978494ea1 Mon Sep 17 00:00:00 2001 From: Won Jun Jang Date: Fri, 6 Apr 2018 14:53:10 -0400 Subject: [PATCH] update comments Signed-off-by: Won Jun Jang --- test/throttler/remote_throttler.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/throttler/remote_throttler.js b/test/throttler/remote_throttler.js index 1d07a3e82..3b7dd7e56 100644 --- a/test/throttler/remote_throttler.js +++ b/test/throttler/remote_throttler.js @@ -79,9 +79,9 @@ describe('RemoteThrottler should', () => { }); it('not fetch credits if uuid is invalid', () => { - throttler = new RemoteThrottler(serviceName); throttler.setProcess({ uuid: null }); throttler._refreshCredits(); + assert.equal(logger._errorMsgs.length, 1, `errors=${logger._errorMsgs}`); }); it("return false for _isAllowed if operation isn't in _credits or operation has no credits", () => { @@ -150,6 +150,10 @@ describe('RemoteThrottler should', () => { }); it('not fetch credits if no operations have been seen', () => { + throttler = new RemoteThrottler(serviceName, { + refreshIntervalMs: 0, + initialDelayMs: 60000, + }); throttler.setProcess({ uuid: uuid }); throttler._refreshCredits(); assert.equal(Object.keys(throttler._credits).length, 0);