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

core_competency_api_testcase::test_list_evidence_in_course random fail

    XMLWordPrintable

    Details

    • Testing Instructions:
      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');
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      wip-mdl-55043

      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

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jul/16