Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2494

Fix test_synchronize_remote_rename_while_download_file()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Tests
    • Story Points:
      2

      Description

      The test is failing every time:

      $ python -m pytest -n0 tests/old_functional/test_remote_move_and_rename.py::TestSyncRemoteMoveAndRename::test_synchronize_remote_rename_while_download_file
      
          def test_synchronize_remote_rename_while_download_file(self):
              local = self.local_1
              remote = self.remote_document_client_1
          
              def callback(uploader):
                  """ Add delay when upload and download. """
                  if not self.engine_1.has_rename:
                      # Rename remote file while downloading
                      self.remote_1.rename(self.folder_id, "Test folder renamed")
                      self.engine_1.has_rename = True
                  time.sleep(3)
                  Engine.suspend_client(self.engine_1, uploader)
          
              self.engine_1.has_rename = False
          
              with patch.object(self.engine_1.remote, "download_callback", new=callback):
                  file = self.location / "resources" / "files" / "testFile.pdf"
                  content = file.read_bytes()
                  remote.make_file("/Test folder", "testFile.pdf", content=content)
          
                  # Rename remote folder then synchronize
                  self.wait_sync(wait_for_async=True)
      >           assert not local.exists("/Test folder")
      E           AssertionError: assert not True
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m