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

Random test_model_timelimit phpunit failure in windows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.7, 3.7.3, 3.8
    • 3.7.4, 3.8.1
    • Analytics, Unit tests
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-67217_master
    • 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.

    Description

      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

            dmonllao David Monllaó
            dmonllao David Monllaó
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jun Pataleta Jun Pataleta
            Jun Pataleta Jun Pataleta
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona), Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              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