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

Date/time dependent random behat failures (take #3)

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • Hide
      1. Using chrome and firefox
      2. Init behat
      3. Run behat with --name 'Any day / month / year combination in date form elements works ok'
      4. Verify that execution ends without error and it includes 16 scenarios.
      Show
      Using chrome and firefox Init behat Run behat with --name 'Any day / month / year combination in date form elements works ok' Verify that execution ends without error and it includes 16 scenarios.

      There have been some behat failures happening consistently over some short time interval.

      • First one failing (link) was started @ Mon Aug 30 15:48:06 UTC 2021
      • First one back to pass (link) was started @ Tue Aug 31 15:48:06 UTC 2021

      So there is a period of 24h (apparently) where ALL the behat runs were consistently ending with these 2 failures:

      001 Scenario: Student cannot submit an assignment prior to the 'allow submissions from' date             # /var/www/html/mod/assign/tests/behat/set_availability.feature:31
            And the activity date in "Assignment name" should contain "##tomorrow noon##%A, %d %B %Y, %I:%M##" # /var/www/html/mod/assign/tests/behat/set_availability.feature:43
              "Wednesday, 1 September 2021, 12:00" text was not found in the "//div[@data-region='activity-information'][@data-activityname='Assignment name'] /div[@data-region='activity-dates']" element (Behat\Mink\Exception\ExpectationException)
       
      002 Scenario: Student can submit an assignment before the due date                                             # /var/www/html/mod/assign/tests/behat/set_availability.feature:64
            And the activity date in "Assignment name" should contain "##+2 days 5 hours 30 minutes##%A, %d %B %Y##" # /var/www/html/mod/assign/tests/behat/set_availability.feature:77
              "Thursday, 2 September 2021" text was not found in the "//div[@data-region='activity-information'][@data-activityname='Assignment name'] /div[@data-region='activity-dates']" element (Behat\Mink\Exception\ExpectationException)
      

      Important note, only Chrome runs, Firefox ones were unaffected.

      Also, note that, right now, we are already out from the "failure window" specified above, so, in order to reproduce the problem, the system clock must be set anywhere within such interval (try some time in the middle, the limits may be not accurate).

      Side note, in MDL-71264 we changed how date/time fields are set, because of some "magic" JS, some combinations were unreachable. That issue tried to test all the possible (back and forth) data changes (month change, year change...). But maybe some combination, exactly happening in the times interval commented above, was not covered.

        1. 1.png
          1.png
          12 kB
        2. 2.png
          2.png
          19 kB
        3. 3.png
          3.png
          12 kB

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Ilya Tregubov Ilya Tregubov
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 51 minutes
                2h 51m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.