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

Relative dates: behat test edge case failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.8
    • Component/s: Course

      Description

      There's a current failure in the mod/assign/tests/behat/relative_dates.feature file.

      The intention was to have an assignment valid for one month and a user (student 2) who started on the first day of the current month and who would have access to this assignment. Howeverm because the 'valid for one month' steps were using 'first and last days of -2 months' syntax, the number of days could vary. Thus, we ended up in a situation on August 30 (today) where the -2 months start and end (for June) gives an assignment valid for only 30 days. Which means it expires on August 30 for the student starting in August - about 5 seconds before the student logs in during the behat test.

      Solution:

      Change all the ranges to be so large that we don't hit these 'number of days in a month' type problems.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jaked Jake Dallimore
              Reporter:
              jaked Jake Dallimore
              Peer reviewer:
              Jun Pataleta
              Integrator:
              Adrian Greeve
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 37 minutes
                  37m