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

Random unit test error in test_execute_report_viewas_user()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0
    • 4.0
    • Report builder
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide

      Covered by CI, you can try to manually test by repeatedly running the affected testcase:

      1. Initiate PHPUnit (e.g. if using MDK: mdk phpunit)
      2. Download 73996test.sh to your Moodle root folder
      3. Open your terminal and go to your Moodle instance's root folder
      4. Make sure to make the script executable (e.g. "chmod +x 73996test.sh")
      5. Run the script ("./73996test.sh")
      6. Confirm that 10 iterations of the test are executed.
      7. Confirm that you get "Success!" at the end of the script execution.
      Show
      Covered by CI, you can try to manually test by repeatedly running the affected testcase: Initiate PHPUnit (e.g. if using MDK: mdk phpunit ) Download 73996test.sh to your Moodle root folder Open your terminal and go to your Moodle instance's root folder Make sure to make the script executable (e.g. " chmod +x 73996test.sh ") Run the script (" ./73996test.sh ") Confirm that 10 iterations of the test are executed. Confirm that you get " Success! " at the end of the script execution.

      We have found this error in CI which seems random:
       

      1) core_reportbuilder\task\send_schedule_test::test_execute_report_viewas_user with data set "View report as specific user" (null, 'userone', 'userone', 'userone')
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'userone@example.com'
      +'usertwo@example.com'
      /home/runner/work/moodle/moodle/reportbuilder/tests/task/send_schedule_test.php:126
      /home/runner/work/moodle/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      

      https://github.com/dravek/moodle/runs/5316109454?check_suite_focus=true#step:11:371
       

        1. 73996test.sh
          0.4 kB
          Jun Pataleta
        2. MDL-73996_testing.webm
          692 kB
          Angelia Dela Cruz

            pholden Paul Holden
            davidcarrillo David Carrillo
            David Carrillo David Carrillo
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Angelia Dela Cruz Angelia Dela Cruz
            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 - 1 hour, 5 minutes
                1h 5m

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