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

core_competency_api_testcase::test_list_evidence_in_course random fail

    XMLWordPrintable

Details

    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_31_STABLE
    • wip-mdl-55043
    • Hide

      Run following for few hours to ensure it never fail.

      while [ $? -eq 0 ]; do vendor/bin/phpunit  competency/tests/api_test.php; done
      

      or apply following and make sure it fails without patch and not after patch

      --- a/competency/tests/api_test.php
      +++ b/competency/tests/api_test.php
      @@ -2610,7 +2610,7 @@ class core_competency_api_testcase extends advanced_testcase {
       
               $result = api::list_evidence_in_course($u1->id, $course->id, $c->get_id());
               $this->assertEquals($result[0]->get_id(), $evidence1->get_id());
      -
      +sleep(2);
               // Now add the evidence to the course module.
               $evidence2 = api::add_evidence($u1->id, $c->get_id(), $cmcontext->id, \core_competency\evidence::ACTION_LOG,
                   'invaliddata', 'error');
      

      Show
      Run following for few hours to ensure it never fail. while [ $? -eq 0 ]; do vendor/bin/phpunit competency/tests/api_test.php; done or apply following and make sure it fails without patch and not after patch --- a/competency/tests/api_test.php +++ b/competency/tests/api_test.php @@ -2610,7 +2610,7 @@ class core_competency_api_testcase extends advanced_testcase { $result = api::list_evidence_in_course($u1->id, $course->id, $c->get_id()); $this->assertEquals($result[0]->get_id(), $evidence1->get_id()); - +sleep(2); // Now add the evidence to the course module. $evidence2 = api::add_evidence($u1->id, $c->get_id(), $cmcontext->id, \core_competency\evidence::ACTION_LOG, 'invaliddata', 'error');

    Description

      core_competency_api_testcase::test_list_evidence_in_course
      Failed asserting that 182001 matches expected '182000'.
       
      /Users/Shared/Jenkins/Home/git_repositories/master/competency/tests/api_test.php:2619
      /Users/Shared/Jenkins/Home/git_repositories/master/lib/phpunit/classes/advanced_testcase.php:80
      

      Attachments

        Activity

          People

            rajeshtaneja Rajesh Taneja
            poltawski Dan Poltawski
            Ryan Wyllie Ryan Wyllie
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            cameron1729 cameron1729
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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