As described in NXP-19009, two concurrent requests trying to access the User Workspace for the very first time may lead to the duplication of one's UserWorkspace.
This causes quite some failures in Web UI IT tests :
- collections;from-browser,-add-document-to-a-collection-and-remove-it.And I can see the document belongs to the "MyCollection" collection
Error Message Error: Promise was rejected with the following reason: timeout Stacktrace Error: Promise was rejected with the following reason: timeout at Browser.hasCollection (test/pages/ui/browser.js:58:12) at World.<anonymous> (test/features/step_definitions/document.js:138:23) at node_modules/meteor-promise/fiber_pool.js:32:39
- favorites;favorites.And I can see the document belongs to the favorites
Error Message AssertionError: expected false to be true Stacktrace AssertionError: expected false to be true at doAsserterAsyncAndAddThen (/opt/jenkins/workspace/master/plugins_nuxeo-web-ui-master-8.10/nuxeo-web-ui-ftest/webdriver/node_modules/chai-as-promised/lib/chai-as-promised.js:293:29) at .<anonymous> (/opt/jenkins/workspace/master/plugins_nuxeo-web-ui-master-8.10/nuxeo-web-ui-ftest/webdriver/node_modules/chai-as-promised/lib/chai-as-promised.js:283:21) at Object.defineProperty.get (/opt/jenkins/workspace/master/plugins_nuxeo-web-ui-master-8.10/nuxeo-web-ui-ftest/webdriver/node_modules/chai/lib/chai/utils/overwriteProperty.js:50:37) at World.<anonymous> (/opt/jenkins/workspace/master/plugins_nuxeo-web-ui-master-8.10/nuxeo-web-ui-ftest/webdriver/test/features/step_definitions/favorites.js:5:7) at /opt/jenkins/workspace/master/plugins_nuxeo-web-ui-master-8.10/nuxeo-web-ui-ftest/webdriver/node_modules/meteor-promise/fiber_pool.js:32:39
NXP-19009 might not be done soon and in any case, won't likely be backported to 8.10.
So we need at least, when trying to retrieve Collections or Favorites, lock the parent folder while doing the creation. All this while being careful with transactions of course.