Преглед на файлове

[misc] drop duplicate log line for unauthorized applyOtUpdate calls

The violation is logged in Router._handleError.
Jakob Ackermann преди 6 години
родител
ревизия
2ce7b36c95
променени са 2 файла, в които са добавени 2 реда и са изтрити 6 реда
  1. 0 4
      services/real-time/app/js/WebsocketController.js
  2. 2 2
      services/real-time/test/unit/js/WebsocketControllerTests.js

+ 0 - 4
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

+ 2 - 2
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 () {