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

Fix test_local_rename_file_while_creating_before_marker on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.323
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Tests

      Description

      [INFO]      [exec] FAIL nuxeo-drive-client/tests/test_local_move_and_rename.py::TestLocalMoveAndRename::test_local_rename_file_while_creating_before_marker
      [INFO]      [exec] ================================== FAILURES ===================================
      [INFO]      [exec] _ TestLocalMoveAndRename.test_local_rename_file_while_creating_before_marker __
      [INFO]      [exec] self = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] result = <TestCaseFunction 'test_local_rename_file_while_creating_before_marker'>
      [INFO]      [exec]     def run(self, result=None):
      [INFO]      [exec]         orig_result = result
      [INFO]      [exec]         if result is None:
      [INFO]      [exec]             result = self.defaultTestResult()
      [INFO]      [exec]             startTestRun = getattr(result, 'startTestRun', None)
      [INFO]      [exec]             if startTestRun is not None:
      [INFO]      [exec]                 startTestRun()
      [INFO]      [exec]         self._resultForDoCleanups = result
      [INFO]      [exec]         result.startTest(self)
      [INFO]      [exec]         testMethod = getattr(self, self._testMethodName)
      [INFO]      [exec]         if (getattr(self.__class__, "__unittest_skip__", False) or
      [INFO]      [exec]             getattr(testMethod, "__unittest_skip__", False)):
      [INFO]      [exec]             # If the class or method was skipped.
      [INFO]      [exec]             try:
      [INFO]      [exec]                 skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
      [INFO]      [exec]                             or getattr(testMethod, '__unittest_skip_why__', ''))
      [INFO]      [exec]                 self._addSkip(result, skip_why)
      [INFO]      [exec]             finally:
      [INFO]      [exec]                 result.stopTest(self)
      [INFO]      [exec]             return
      [INFO]      [exec]         try:
      [INFO]      [exec]             success = False
      [INFO]      [exec]             try:
      [INFO]      [exec]                 self.setUp()
      [INFO]      [exec]             except SkipTest as e:
      [INFO]      [exec]                 self._addSkip(result, str(e))
      [INFO]      [exec]             except KeyboardInterrupt:
      [INFO]      [exec]                 raise
      [INFO]      [exec]             except:
      [INFO]      [exec]                 result.addError(self, sys.exc_info())
      [INFO]      [exec]             else:
      [INFO]      [exec]                 try:
      [INFO]      [exec] >                   testMethod()
      [INFO]      [exec] cleanUpSuccess = True
      [INFO]      [exec] orig_result = <TestCaseFunction 'test_local_rename_file_while_creating_before_marker'>
      [INFO]      [exec] result     = <TestCaseFunction 'test_local_rename_file_while_creating_before_marker'>
      [INFO]      [exec] self       = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] success    = False
      [INFO]      [exec] testMethod = <bound method TestLocalMoveAndRename.test_local_rename_file_while_creating_bef...lMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>>
      [INFO]      [exec] ..\deploy-dir\drive-2.7.13-python\lib\unittest\case.py:329: 
      [INFO]      [exec] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
      [INFO]      [exec] self = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec]     def test_local_rename_file_while_creating_before_marker(self):
      [INFO]      [exec]         global marker, client
      [INFO]      [exec]         local_client = self.local_client_1
      [INFO]      [exec]         root_local_client = self.local_root_client_1
      [INFO]      [exec]         remote_client = self.remote_document_client_1
      [INFO]      [exec]         marker = False
      [INFO]      [exec]         client = None
      [INFO]      [exec]         def set_remote_id(ref,remote_id,name='ndrive'):
      [INFO]      [exec]             global marker, client
      [INFO]      [exec]             if 'File.txt' in ref and not marker:
      [INFO]      [exec]                 root_local_client.rename(ref, 'Renamed File.txt')
      [INFO]      [exec]                 marker = True
      [INFO]      [exec]             LocalClient.set_remote_id(client, ref, remote_id, name)
      [INFO]      [exec]         def get_local_client():
      [INFO]      [exec]             global client
      [INFO]      [exec]             client = Engine.get_local_client(self.engine_1)
      [INFO]      [exec]             client.set_remote_id = set_remote_id
      [INFO]      [exec]             return client
      [INFO]      [exec]         self.engine_1.get_local_client = get_local_client
      [INFO]      [exec]         self.local_client_1.make_file('/', u'File.txt',
      [INFO]      [exec]                                       content=u'Some Content 2'.encode('utf-8'))
      [INFO]      [exec]         self.wait_sync(fail_if_timeout=False)
      [INFO]      [exec]         self.assertTrue(local_client.exists(u'/Renamed File.txt'))
      [INFO]      [exec]         self.assertFalse(local_client.exists(u'/File.txt'))
      [INFO]      [exec]         # Path dont change on Nuxeo
      [INFO]      [exec]         info = remote_client.get_info(u'/File.txt')
      [INFO]      [exec] >       self.assertEqual('Renamed File.txt', info.name)
      [INFO]      [exec] get_local_client = <function get_local_client at 0x0C971E70>
      [INFO]      [exec] info       = NuxeoDocumentInfo(root=u'9827e532-0220-4f88-82a0-743e39fe697d', name=u'File.tx...se, filename=u'File.txt', lock_owner=None, lock_created=None, permissions=None)
      [INFO]      [exec] local_client = <tests.win_local_client.WindowsLocalClient object at 0x0C82DDB0>
      [INFO]      [exec] remote_client = <RemoteDocumentClient base_folder=None, blob_timeout=60, check_suspended=None,...3SF5V2PSVOUZC4CRBQLRIA\\tmp\\tmpuwdq8e-nxdrive-uploads', user_id='driveuser_1'>
      [INFO]      [exec] root_local_client = <nxdrive.client.local_client.LocalClient object at 0x0BE63FD0>
      [INFO]      [exec] self       = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] set_remote_id = <function set_remote_id at 0x0C9718F0>
      [INFO]      [exec] nuxeo-drive-client\tests\test_local_move_and_rename.py:159: 
      [INFO]      [exec] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
      [INFO]      [exec] self = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] first = 'Renamed File.txt', second = 'File.txt', msg = None
      [INFO]      [exec]     def assertEqual(self, first, second, msg=None):
      [INFO]      [exec]         """Fail if the two objects are unequal as determined by the '=='
      [INFO]      [exec]                operator.
      [INFO]      [exec]             """
      [INFO]      [exec]         assertion_func = self._getAssertEqualityFunc(first, second)
      [INFO]      [exec] >       assertion_func(first, second, msg=msg)
      [INFO]      [exec] assertion_func = <bound method TestLocalMoveAndRename._baseAssertEqual of <tests.test_local_mov...lMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>>
      [INFO]      [exec] first      = 'Renamed File.txt'
      [INFO]      [exec] msg        = None
      [INFO]      [exec] second     = 'File.txt'
      [INFO]      [exec] self       = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] ..\deploy-dir\drive-2.7.13-python\lib\unittest\case.py:513: 
      [INFO]      [exec] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
      [INFO]      [exec] self = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] first = 'Renamed File.txt', second = 'File.txt'
      [INFO]      [exec] msg = "'Renamed File.txt' != u'File.txt'"
      [INFO]      [exec]     def _baseAssertEqual(self, first, second, msg=None):
      [INFO]      [exec]         """The default assertEqual implementation, not type specific."""
      [INFO]      [exec]         if not first == second:
      [INFO]      [exec]             standardMsg = '%s != %s' % (safe_repr(first), safe_repr(second))
      [INFO]      [exec]             msg = self._formatMessage(msg, standardMsg)
      [INFO]      [exec] >           raise self.failureException(msg)
      [INFO]      [exec] E           AssertionError: 'Renamed File.txt' != u'File.txt'
      [INFO]      [exec] first      = 'Renamed File.txt'
      [INFO]      [exec] msg        = "'Renamed File.txt' != u'File.txt'"
      [INFO]      [exec] second     = 'File.txt'
      [INFO]      [exec] self       = <tests.test_local_move_and_rename.TestLocalMoveAndRename testMethod=test_local_rename_file_while_creating_before_marker>
      [INFO]      [exec] standardMsg = "'Renamed File.txt' != u'File.txt'"
      [INFO]      [exec] ..\deploy-dir\drive-2.7.13-python\lib\unittest\case.py:506: AssertionError
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 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