Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32614

update_test_lifecycle may fail because datetime.strptime() is not thread safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.3, 3.7.2
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Sprint:
      TIG 2018-1-29
    • Linked BF Score:
      0

      Description

      The update_test_lifecycle.py script fetches the test history in multiple threads.
      In these threads the code calls the test_failures module which uses the datetime.strptime() method.
      As filed in https://bugs.python.org/issue7980, that method does not import _strptime.py in a thread safe way.
      This can lead to the following error: AttributeError: 'module' object has no attribute '_strptime'.

      We need to implement a workaround: either calling the strptime() method or importing the _strptime module explicitly before starting the threads.

        Attachments

          Activity

            People

            Assignee:
            yves.duhem Yves Duhem
            Reporter:
            yves.duhem Yves Duhem
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: