From ffc5c4be8f71e5183c31e21cde75c6a6bf7be706 Mon Sep 17 00:00:00 2001 From: Paulo Jorge Reis Date: Thu, 16 Jul 2020 11:10:13 +0100 Subject: [PATCH] Merge pull request #3009 from overleaf/jpa-fix-flaky-locking-in-tests [misc] ProjectStructureMongoLockTest: eventually restore locking timeout GitOrigin-RevId: 6c139edb0f6e37775c459a50a71dd90802e366fc --- .../test/acceptance/src/ProjectStructureMongoLockTest.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/web/test/acceptance/src/ProjectStructureMongoLockTest.js b/services/web/test/acceptance/src/ProjectStructureMongoLockTest.js index 20e5fc7f53..dd3909def1 100644 --- a/services/web/test/acceptance/src/ProjectStructureMongoLockTest.js +++ b/services/web/test/acceptance/src/ProjectStructureMongoLockTest.js @@ -32,6 +32,14 @@ const _ = require('lodash') describe('ProjectStructureMongoLock', function() { describe('whilst a project lock is taken', function() { + let oldMaxLockWaitTime + before(function() { + oldMaxLockWaitTime = LockManager.MAX_LOCK_WAIT_TIME + }) + after(function() { + LockManager.MAX_LOCK_WAIT_TIME = oldMaxLockWaitTime + }) + beforeEach(function(done) { // We want to instantly fail if the lock is taken LockManager.MAX_LOCK_WAIT_TIME = 1