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

Fix test_synchronize_no_space_left_on_device()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.323
    • Fix Version/s: 4.1.0
    • Component/s: Tests

      Description

      [INFO]      [exec] FAIL nuxeo-drive-client/tests/test_local_storage_issue.py::TestLocalStorageSpaceIssue::test_synchronize_no_space_left_on_device
      [INFO]      [exec] =================================== FAILURES ===================================
      [INFO]      [exec] _____ TestLocalStorageSpaceIssue.test_synchronize_no_space_left_on_device ______
      [INFO]      [exec] self = <tests.test_local_storage_issue.TestLocalStorageSpaceIssue testMethod=test_synchronize_no_space_left_on_device>
      [INFO]      [exec]     def test_synchronize_no_space_left_on_device(self):
      [INFO]      [exec]         local = self.local_client_1
      [INFO]      [exec]         remote = self.remote_document_client_1
      [INFO]      [exec]         # Synchronize root workspace
      [INFO]      [exec]         self.engine_1.start()
      [INFO]      [exec]         self.wait_sync(wait_for_async=True)
      [INFO]      [exec]         self.assertTrue(local.exists('/'))
      [INFO]      [exec]         self.engine_1.stop()
      [INFO]      [exec]         # Create a file in the remote root workspace
      [INFO]      [exec]         remote.make_file('/', 'test_KO.odt', 'Some large content.')
      [INFO]      [exec]         # Synchronize simulating a "No space left on device" error
      [INFO]      [exec]         self.engine_1.remote_filtered_fs_client_factory = RemoteTestClient
      [INFO]      [exec]         self.engine_1.invalidate_client_cache()
      [INFO]      [exec]         error = IOError("No space left on device")
      [INFO]      [exec]         self.engine_1.get_remote_client().make_download_raise(error)
      [INFO]      [exec]         self.engine_1.start()
      [INFO]      [exec]         # By default engine will not consider being syncCompleted because of the blacklist
      [INFO]      [exec]         self.wait_sync(wait_for_async=True, timeout=10, fail_if_timeout=False, enforce_errors=False)
      [INFO]      [exec]         # Temporary download file (.nxpart) should be created locally but not renamed then removed
      [INFO]      [exec]         # Synchronization should not fail: doc pair should be blacklisted and there should be 1 error
      [INFO]      [exec]         self.assertNxPart('/', name='test_KO.odt', present=False)
      [INFO]      [exec]         self.assertFalse(local.exists('/test_KO.odt'))
      [INFO]      [exec]         states_in_error = self.engine_1.get_dao().get_errors(limit=0)
      [INFO]      [exec]         self.assertEqual(len(states_in_error), 1)
      [INFO]      [exec]         self.assertEqual(states_in_error[0].remote_name, 'test_KO.odt')
      [INFO]      [exec]         # Create another file in the remote root workspace
      [INFO]      [exec]         remote.make_file('/', 'test_OK.odt', 'Some small content.')
      [INFO]      [exec]         # Synchronize without simulating any error
      [INFO]      [exec]         self.engine_1.get_remote_client().make_download_raise(None)
      [INFO]      [exec]         self.engine_1.remote_filtered_fs_client_factory = RemoteFilteredFileSystemClient
      [INFO]      [exec]         self.engine_1.invalidate_client_cache()
      [INFO]      [exec]         self.wait_sync(wait_for_async=True, timeout=10, fail_if_timeout=False, enforce_errors=False)
      [INFO]      [exec]         # Remote file should be created locally
      [INFO]      [exec] >       self.assertTrue(local.exists('/test_OK.odt'))
      [INFO]      [exec] E       AssertionError: False is not true
      [INFO]      [exec] error      = IOError('No space left on device',)
      [INFO]      [exec] local      = <tests.mac_local_client.MacLocalClient object at 0x135f5a150>
      [INFO]      [exec] remote     = <RemoteDocumentClient base_folder=None, blob_timeout=60, check_suspended=None,...WYXNG3QOGLZ33L2ZCHAO7QNA/tmp/tmp8nl8xA-nxdrive-uploads', user_id='driveuser_1'>
      [INFO]      [exec] self       = <tests.test_local_storage_issue.TestLocalStorageSpaceIssue testMethod=test_synchronize_no_space_left_on_device>
      [INFO]      [exec] states_in_error = [StateRow[3](Local: u'/Nuxeo Drive Test Workspace/test_KO.odt', Remote: default...c2f74d2c, Local state: unknown, Remote state: created, State: remotely_created)]
      [INFO]      [exec] nuxeo-drive-client/tests/test_local_storage_issue.py:62: AssertionError
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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