Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-3446

[Core] When reseting a workspace, it must be up to date with origin

    XMLWordPrintable

    Details

      Description

      WorkspaceResourcesAdapterTest.testUploadResource() fails randomly.
      The test uploads a resource file "file2.txt". Then it gets a workspace, and checks that the file is indeed present.
      But sometimes it is not.
      The problem is, that when getting a workspace from the pool, it gets cleared up but not aligned correctly on HEAD of the origin.
      To reproduce the behaviour, put a breakpoint at:
      com.nuxeo.studio.web.v2.wsadapter.WorkspaceResourcesAdapterTest.testUploadResource(), ligne 192 (

      Workspace ws = workspaceService.getWorkspace(PROJECT);

      )
      Then delete all the workspaces from the cache which have the file:

      $ find -name "file2.txt" |grep cat2
      ./myProject-#4-cloned-2016-06-24-14-15-28/studio/resources/cat2/file2.txt
      ./myProject-#2-cloned-2016-06-24-14-15-28/studio/resources/cat2/file2.txt
      
      $ rm -rf myProject-#2-cloned-2016-06-24-14-15-28/ myProject-#4-cloned-2016-06-24-14-15-28/
      

      Then continue the test execution.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: