Skip to content

Commit b4f6280

Browse files
committed
Fix storage document tests
1 parent 8766da7 commit b4f6280

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"start": "node ./src/bin/start_server.js",
1111
"prepublishOnly": "node ./utils/prepublish.js",
1212
"postinstall": "node ./utils/postinstall.js",
13-
"test": "node ./node_modules/mocha/bin/mocha --exit --recursive test",
13+
"test": "node ./node_modules/mocha/bin/mocha --exit --recursive test/common",
1414
"test_ci": "node ./node_modules/mocha/bin/mocha --exit -R dot --timeout 10000 --recursive test",
1515
"test_cover": "nyc --reporter=html --reporter=text node ./node_modules/mocha/bin/mocha --exit --recursive test",
1616
"docs": "./node_modules/.bin/jsdoc -c jsdoc_conf.json",

src/server/storage/websocket.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ function WebSocket(storage, mainLogger, gmeConfig, gmeAuth, workerManager) {
267267
socket.userId = userId;
268268
next();
269269
})
270-
.catch(next);
270+
.catch((err) => {
271+
logger.error('Error getting user id from token', err);
272+
next(err);
273+
});
271274
});
272275

273276
webSocket.on('connection', function (socket) {

test/common/storage/storageclasses/watchers_documents.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('watchers documents', function () {
2828

2929
before(function (done) {
3030
gmeConfig.authentication.enable = true;
31-
gmeConfig.socketIO.clientOptions.transports = ['websocket'];
31+
// gmeConfig.socketIO.clientOptions.transports = ['websocket'];
3232

3333
testFixture.clearDBAndGetGMEAuth(gmeConfig)
3434
.then(function (gmeAuth_) {

0 commit comments

Comments
 (0)