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

Maildigest tests can query a wrong adhoc task

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.9.19, 3.11.12, 4.0.6, 4.1.1
    • 3.7, 3.9.7, 3.9.14, 3.10.11, 3.11.7, 4.0.1
    • Forum
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_37_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-65939-master
    • Hide
      1. Install a plugin that creates an adhoc task upon an event (enrol_auto)
      2. Initialise a PHPUnit testing environment with the help of our Moodle docs
      3. Run php unit tests for both mod_forum && enrol_auto
      4. Confirm that no test failures are reported
      Show
      Install a plugin that creates an adhoc task upon an event ( enrol_auto ) Initialise a PHPUnit testing environment with the help of our Moodle docs Run php unit tests for both mod_forum && enrol_auto Confirm that no test failures are reported

      Mail digest tests collect all records from the task_adhoc table. Other plugins (enrol_auto, enrol_coursecompleted, format_tiles, ...) also add records to this table, so the queries in this test have to be limited to this component only.

      Replication steps:

      1. Install a plugin that creates an adhoc task upon an event (enrol_auto, enrol_coursecompleted, format_tiles, ...)
      2. Run php unit tests

      Expected: No errors
      Actual: 2 errors assertGreaterThanOrEqual(time(), $task->nextruntime)

       

        1. 311_enrol_auto.png
          311_enrol_auto.png
          31 kB
        2. 311_mod_forum.png
          311_mod_forum.png
          55 kB
        3. 39_enrol_auto.png
          39_enrol_auto.png
          33 kB
        4. 39_mod_forum.png
          39_mod_forum.png
          56 kB
        5. 40_enrol_auto.png
          40_enrol_auto.png
          32 kB
        6. 40_mod_forum.png
          40_mod_forum.png
          60 kB
        7. 41_enrol_auto.png
          41_enrol_auto.png
          34 kB
        8. 41_mod_forum.png
          41_mod_forum.png
          58 kB
        9. 42_enrol_auto.png
          42_enrol_auto.png
          32 kB
        10. 42_mod_forum.png
          42_mod_forum.png
          59 kB

            rdebleu Renaat Debleu
            rdebleu Renaat Debleu
            Glyn (Mathew) May Glyn (Mathew) May
            Andrew Lyons Andrew Lyons
            Safat Shahin Safat Shahin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 5 minutes
                3h 5m

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