From 2ce7b36c958e70ca9070c583b97a3fdfd992b7fe Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 27 Aug 2020 10:18:43 +0100 Subject: [PATCH] [misc] drop duplicate log line for unauthorized applyOtUpdate calls The violation is logged in Router._handleError. --- services/real-time/app/js/WebsocketController.js | 4 ---- services/real-time/test/unit/js/WebsocketControllerTests.js | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/services/real-time/app/js/WebsocketController.js b/services/real-time/app/js/WebsocketController.js index 7b5f2af602..a7b2cd43fa 100644 --- a/services/real-time/app/js/WebsocketController.js +++ b/services/real-time/app/js/WebsocketController.js @@ -462,10 +462,6 @@ module.exports = WebsocketController = { update, function (error) { if (error) { - logger.warn( - { err: error, doc_id, client_id: client.id, version: update.v }, - 'client is not authorized to make update' - ) setTimeout( () => // Disconnect, but give the client the chance to receive the error diff --git a/services/real-time/test/unit/js/WebsocketControllerTests.js b/services/real-time/test/unit/js/WebsocketControllerTests.js index 6d69e70fe5..f210a16ec8 100644 --- a/services/real-time/test/unit/js/WebsocketControllerTests.js +++ b/services/real-time/test/unit/js/WebsocketControllerTests.js @@ -1493,8 +1493,8 @@ describe('WebsocketController', function () { // it "should disconnect the client", -> // @client.disconnect.called.should.equal true - it('should log a warning', function () { - return this.logger.warn.called.should.equal(true) + it('should not log a warning', function () { + return this.logger.warn.called.should.equal(false) }) return it('should call the callback with the error', function () {