Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67217

Random test_model_timelimit phpunit failure in windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7, 3.7.3, 3.8
    • Fix Version/s: 3.7.4, 3.8.1
    • Component/s: Analytics, Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      Pre-requisites

      1. A travis account linked to your github account

      Test (master)

      1. Create a test branch in your git repo
      2. Cherry pick the top commit on git://github.com/dmonllao/moodle.git MDL-67217_master-test
      3. Push the branch to your git repo and wait until you get an email from travis with the result, the result should be a pass

      All branches are unit tested in the CI server.

      Show
      Pre-requisites A travis account linked to your github account Test (master) Create a test branch in your git repo Cherry pick the top commit on git://github.com/dmonllao/moodle.git MDL-67217 _master-test Push the branch to your git repo and wait until you get an email from travis with the result, the result should be a pass All branches are unit tested in the CI server.
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull from Repository:
    • Pull 3.7 Branch:
    • Pull Master Branch:
      MDL-67217_master

      Description

      Eloy Lafuente (stronk7) found a random phpunit failure in test_model_timelimit. After investigating the issue a bit I saw that usleep is not always waiting the specified number of milliseconds and this leads to random failures.

      Apparently, this is an issue in windows usleep implementation and we may also need to revisit other uses of usleep in our unit test suit git grep -C 2 "usleep(" | grep -C 2 test The cost of stability in windows may be a few more seconds of phpunit execution.

        Attachments

          Activity

            People

            Assignee:
            dmonllao David Monllaó
            Reporter:
            dmonllao David Monllaó
            Peer reviewer:
            Eloy Lafuente (stronk7)
            Integrator:
            Jun Pataleta
            Tester:
            Jun Pataleta
            Participants:
            Component watchers:
            Elizabeth Dalton, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jan/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours, 56 minutes
                1d 3h 56m