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

PHPUnit failure on Oracle due to erroneous default sorting

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      This is just a simple regression test

      1. Set up oracle docker instance and the the oracle oci driver for php (see here for Ubuntu derivatives )
      2. Run the following test a few times and make sure it passes (no regression)

        vendor/bin/phpunit mod_data_generator_testcase mod/data/tests/generator_test.php
        

      Show
      This is just a simple regression test Set up oracle docker instance and the the oracle oci driver for php ( see here for Ubuntu derivatives ) Run the following test a few times and make sure it passes (no regression) vendor/bin/phpunit mod_data_generator_testcase mod/data/tests/generator_test.php
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56228-master

      Description

      Testing a library upgrade, I came across this failure (using the moodle oracle docker instance):

      There was 1 failure:
       
      1) mod_data_generator_testcase::test_create_entry
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'menu1'
      +'opt1##opt2##opt3##opt4'
       
      /home/jake/moodledata/omaster/moodle/mod/data/tests/generator_test.php:221
      /home/jake/moodledata/omaster/moodle/lib/phpunit/classes/advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit mod_data_generator_testcase mod/data/tests/generator_test.php
       
      FAILURES!
      Tests: 3, Assertions: 70, Failures: 1.
      

      The first run passed, but subsequent runs hit this error every time. The problem is that the default sort by (which should be ASC), isn't functioning properly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jaked Jake Dallimore
                Reporter:
                jaked Jake Dallimore
                Peer reviewer:
                Rajesh Taneja
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Simey Lameze
                Participants:
                Component watchers:
                Adrian Greeve, Mihail Geshoski, Peter Dias, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/16