Moodle
  1. Moodle
  2. MDL-20891

some dmllib unit tests failing if record cache enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.5, 1.9.6
    • Fix Version/s: 2.0
    • Component/s: Unit tests
    • Labels:
      None
    • Environment:
      linux, postgresql
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      5605

      Description

      To reproduce:

      set "cache type" = internal
      set "record cache" = yes

      Run the unit test lib/simpletest/testdmllib.php.

      This results in errors similar to:

      Fail: lib/simpletest/testdmllib.php / ? dmllib_test / ? test_backslashes_and_quotes / ?
      Equal expectation fails at character 0 with [new entry] and [insert backslashes and quotes alone (even): "" ''
      ] at [/opt/local/www/m19/lib/simpletest/testdmllib.php line 348]

      test_backslashes_and_quotes() is getting cached data instead of the record inserted immediately before the select, and so the test fails.

        Activity

        Hide
        Matthew N added a comment -

        I just did an upgrade of a site to 1.9.7 and I'm seeing this issue too. What I would like to know if is this is a test issue or a legitimate failure? In other words, can I deploy this upgrade to the production site with the internal record cache on without side-effects?

        Show
        Matthew N added a comment - I just did an upgrade of a site to 1.9.7 and I'm seeing this issue too. What I would like to know if is this is a test issue or a legitimate failure? In other words, can I deploy this upgrade to the production site with the internal record cache on without side-effects?
        Hide
        Brian King added a comment -

        I'm not sure what version your production site is running, but I think this is an issue for all 1.9.x versions; so it would seem to only be a testing issue.

        Show
        Brian King added a comment - I'm not sure what version your production site is running, but I think this is an issue for all 1.9.x versions; so it would seem to only be a testing issue.
        Hide
        Petr Škoda added a comment -

        Hello, the record cache was removed in 2.0, it should not be a problem any more, thanks for the report.

        Show
        Petr Škoda added a comment - Hello, the record cache was removed in 2.0, it should not be a problem any more, thanks for the report.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: