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

Random unit test failures with core_message provider testcase

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.2, 3.5
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Messages, Privacy
    • Labels:

      Description

      This was noticed on integration testing runs. see here

      There was 1 failure:
       
      1) core_message_privacy_provider_testcase::test_export_for_context_with_messages
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'Yes'
      +'No'

      Looks to be an ordering issue, as it seems $m1, $m2 and $m3 are coming back in the wrong order. Looking at the provider, it does seem to be ordering the messages, so perhaps the issue lies with the get_data call? Not 100% sure.

      Additionally, the variables $m7, $m8 and $m9 aren't used in that test and should be removed.

      Tagging as all branches in case.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18