Details

    • Testing Instructions:
      Hide

      Note to tester: In order to test this is ideal to have MDL-39343 already integrated, because that one fixes some problems (all databases) detected on upgrade / re-installing.

      TEST0: Verify that the "databasemeta" cache is being used in the caches footer information, leading to hits on page reloads at front page & course page, for all databases.
      TEST1: Install 2.5 for all databases.
      TEST2: Upgrade from both 2.2 and 2.4 all databases.
      TEST3: Run lib/dml, lib/ddl and cache unit tests for all databases (note that cache ones can show some tests skipped).

      Show
      Note to tester: In order to test this is ideal to have MDL-39343 already integrated, because that one fixes some problems (all databases) detected on upgrade / re-installing. TEST0: Verify that the "databasemeta" cache is being used in the caches footer information, leading to hits on page reloads at front page & course page, for all databases. TEST1: Install 2.5 for all databases. TEST2: Upgrade from both 2.2 and 2.4 all databases. TEST3: Run lib/dml, lib/ddl and cache unit tests for all databases (note that cache ones can show some tests skipped).
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      50027

      Description

      Right now the databasemeta cache is only implemented in the mysqli and pgsql drivers:

      grep -lr 'cache::make' *
      
      mysqli_native_moodle_database.php
      pgsql_native_moodle_database.php
      
      

      This is about to implement it in the rest of drivers.

      Ciao

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to peer-review.

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to peer-review.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Note to testers, integrators. If this is integrated together with MDL-39390, then both issues can be tested together.

          Show
          Eloy Lafuente (stronk7) added a comment - Note to testers, integrators. If this is integrated together with MDL-39390 , then both issues can be tested together.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to integration. The change is really simple and we need databasemeta caching working for all DBs.

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to integration. The change is really simple and we need databasemeta caching working for all DBs.
          Hide
          Dan Poltawski added a comment -

          Integrated to master - thanks Eloy

          Show
          Dan Poltawski added a comment - Integrated to master - thanks Eloy
          Hide
          Ankit Agarwal added a comment -

          Results for postgres
          Run phpunit on 2.5 (ran all phpunit tests. all tests passed except a few skips as expected [Skipped: 5])
          Check frontpage cache queries (I can see the meta used however hits are always < misses for me -not sure that matters)
          Install 2.2 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli)
          install 2.4 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli)

          Show
          Ankit Agarwal added a comment - Results for postgres Run phpunit on 2.5 (ran all phpunit tests. all tests passed except a few skips as expected [Skipped: 5] ) Check frontpage cache queries (I can see the meta used however hits are always < misses for me -not sure that matters) Install 2.2 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli) install 2.4 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli)
          Hide
          Ankit Agarwal added a comment -

          Results for mysql
          Run phpunit on 2.5 (skipping as run during integration all the time.)
          Check frontpage cache queries (I can see the meta used however again hits were < misses for me -not sure that matters)
          Install 2.2 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli)
          install 2.4 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli)

          Show
          Ankit Agarwal added a comment - Results for mysql Run phpunit on 2.5 (skipping as run during integration all the time.) Check frontpage cache queries (I can see the meta used however again hits were < misses for me -not sure that matters) Install 2.2 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli) install 2.4 and upgrade to 2.5 (No errors were shown during install and during upgrade using cli)
          Hide
          Ankit Agarwal added a comment -

          Michael and Adrian were kind enough to test out the oracle part of the test. Adrian, received "segmentation fault" in get_recordset unit test, however he got it still after the patch being removed and all unit tests passed for Micahel, although he reported unittests being extremely slow as compared to previous version.

          Am still in the process of setting up MSSQL. Once done I will report back results.

          Show
          Ankit Agarwal added a comment - Michael and Adrian were kind enough to test out the oracle part of the test. Adrian, received "segmentation fault" in get_recordset unit test, however he got it still after the patch being removed and all unit tests passed for Micahel, although he reported unittests being extremely slow as compared to previous version. Am still in the process of setting up MSSQL. Once done I will report back results.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The segmentation fault with oracle is because of having the oracle statement cache enabled for testing. Just set:

          oci8.statement_cache_size = 0
          

          and that will cause the seg fault to disappear (although will make oracle testing really slooooow). It's an old problem, see MDL-20339 & http://bugs.php.net/49803).

          Note that it DOES NOT affect normal operations, only testing, where a lot of operations (drop/create the same table) are repeated like crazy. So you can enable it once DML testing has ended.

          Ciao

          About getting more misses than hits... in frontpage and admin/index.php page that can be normal, because some caches are disabled there (as admin) in order to be able to detect if there is something to upgrade. If you go, for example, to a course page and load it twice... then you should get ALL hits in the "file/memcached/..." store and then the persistent one having some misses, but not problem, because the "file/memcached/..." store will be serving the information quickly to it. The important number of missed is the "lower store" one. Those are the ones requiring the code to run (in this case, going to database and recalculating the column specs). So getting 0 misses there is perfect.

          Re-ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The segmentation fault with oracle is because of having the oracle statement cache enabled for testing. Just set: oci8.statement_cache_size = 0 and that will cause the seg fault to disappear (although will make oracle testing really slooooow). It's an old problem, see MDL-20339 & http://bugs.php.net/49803 ). Note that it DOES NOT affect normal operations, only testing, where a lot of operations (drop/create the same table) are repeated like crazy. So you can enable it once DML testing has ended. Ciao About getting more misses than hits... in frontpage and admin/index.php page that can be normal, because some caches are disabled there (as admin) in order to be able to detect if there is something to upgrade. If you go, for example, to a course page and load it twice... then you should get ALL hits in the "file/memcached/..." store and then the persistent one having some misses, but not problem, because the "file/memcached/..." store will be serving the information quickly to it. The important number of missed is the "lower store" one. Those are the ones requiring the code to run (in this case, going to database and recalculating the column specs). So getting 0 misses there is perfect. Re-ciao
          Hide
          Ankit Agarwal added a comment -
          PHP Notice:  Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/assign/submission/file/settings.php on line 41
          PHP Stack trace:
          PHP   1. {main}() /var/www/int/msint/admin/cli/install.php:0
          PHP   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
          PHP   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
          PHP   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
          PHP   5. require() /var/www/int/msint/lib/adminlib.php:6379
          PHP   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
          PHP   7. include() /var/www/int/msint/lib/pluginlib.php:3366
          PHP   8. assign_plugin_manager::add_admin_assign_plugin_settings() /var/www/int/msint/mod/assign/settings.php:39
          PHP   9. include() /var/www/int/msint/mod/assign/adminlib.php:481
          
          Notice: Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/assign/submission/file/settings.php on line 41
          
          Call Stack:
              0.0010    1020008   1. {main}() /var/www/int/msint/admin/cli/install.php:0
              3.2967   56913688   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
             96.9812   96956544   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
             96.9812   96956704   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
             97.8650   97035352   5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379
             97.8711   97045056   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
             97.8750   97139632   7. include('/var/www/int/msint/mod/assign/settings.php') /var/www/int/msint/lib/pluginlib.php:3366
             97.8832   97162760   8. assign_plugin_manager::add_admin_assign_plugin_settings() /var/www/int/msint/mod/assign/settings.php:39
             97.8928   97183568   9. include('/var/www/int/msint/mod/assign/submission/file/settings.php') /var/www/int/msint/mod/assign/adminlib.php:481
          
          PHP Notice:  Undefined property: stdClass::$assignment_maxbytes in /var/www/int/msint/mod/assignment/settings.php on line 10
          PHP Stack trace:
          PHP   1. {main}() /var/www/int/msint/admin/cli/install.php:0
          PHP   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
          PHP   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
          PHP   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
          PHP   5. require() /var/www/int/msint/lib/adminlib.php:6379
          PHP   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
          PHP   7. include() /var/www/int/msint/lib/pluginlib.php:3366
          
          Notice: Undefined property: stdClass::$assignment_maxbytes in /var/www/int/msint/mod/assignment/settings.php on line 10
          
          Call Stack:
              0.0010    1020008   1. {main}() /var/www/int/msint/admin/cli/install.php:0
              3.2967   56913688   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
             96.9812   96956544   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
             96.9812   96956704   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
             97.8650   97035352   5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379
             97.9235   97173312   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
             97.9271   97237880   7. include('/var/www/int/msint/mod/assignment/settings.php') /var/www/int/msint/lib/pluginlib.php:3366
          
          PHP Notice:  Undefined property: stdClass::$forum_maxbytes in /var/www/int/msint/mod/forum/settings.php on line 49
          PHP Stack trace:
          PHP   1. {main}() /var/www/int/msint/admin/cli/install.php:0
          PHP   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
          PHP   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
          PHP   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
          PHP   5. require() /var/www/int/msint/lib/adminlib.php:6379
          PHP   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
          PHP   7. include() /var/www/int/msint/lib/pluginlib.php:3366
          
          Notice: Undefined property: stdClass::$forum_maxbytes in /var/www/int/msint/mod/forum/settings.php on line 49
          
          Call Stack:
              0.0010    1020008   1. {main}() /var/www/int/msint/admin/cli/install.php:0
              3.2967   56913688   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
             96.9812   96956544   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
             96.9812   96956704   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
             97.8650   97035352   5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379
             98.0667   99636640   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
             98.0694   99749600   7. include('/var/www/int/msint/mod/forum/settings.php') /var/www/int/msint/lib/pluginlib.php:3366
          
          PHP Notice:  Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/workshop/settings.php on line 51
          PHP Stack trace:
          PHP   1. {main}() /var/www/int/msint/admin/cli/install.php:0
          PHP   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
          PHP   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
          PHP   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
          PHP   5. require() /var/www/int/msint/lib/adminlib.php:6379
          PHP   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
          PHP   7. include() /var/www/int/msint/lib/pluginlib.php:3366
          
          Notice: Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/workshop/settings.php on line 51
          
          Call Stack:
              0.0010    1020008   1. {main}() /var/www/int/msint/admin/cli/install.php:0
              3.2967   56913688   2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681
             96.9812   96956544   3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487
             96.9812   96956704   4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399
             97.8650   97035352   5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379
             99.2274  110433400   6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17
             99.2301  110533944   7. include('/var/www/int/msint/mod/workshop/settings.php') /var/www/int/msint/lib/pluginlib.php:3366
          

          Getting those errors while installing on mssql. Not sure if they are related to this issue. can be because of MDL-39077 . Stopping test for further investigation.

          Show
          Ankit Agarwal added a comment - PHP Notice: Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/assign/submission/file/settings.php on line 41 PHP Stack trace: PHP 1. {main}() /var/www/int/msint/admin/cli/install.php:0 PHP 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 PHP 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 PHP 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 PHP 5. require() /var/www/int/msint/lib/adminlib.php:6379 PHP 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 PHP 7. include() /var/www/int/msint/lib/pluginlib.php:3366 PHP 8. assign_plugin_manager::add_admin_assign_plugin_settings() /var/www/int/msint/mod/assign/settings.php:39 PHP 9. include() /var/www/int/msint/mod/assign/adminlib.php:481 Notice: Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/assign/submission/file/settings.php on line 41 Call Stack: 0.0010 1020008 1. {main}() /var/www/int/msint/admin/cli/install.php:0 3.2967 56913688 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 96.9812 96956544 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 96.9812 96956704 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 97.8650 97035352 5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379 97.8711 97045056 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 97.8750 97139632 7. include('/var/www/int/msint/mod/assign/settings.php') /var/www/int/msint/lib/pluginlib.php:3366 97.8832 97162760 8. assign_plugin_manager::add_admin_assign_plugin_settings() /var/www/int/msint/mod/assign/settings.php:39 97.8928 97183568 9. include('/var/www/int/msint/mod/assign/submission/file/settings.php') /var/www/int/msint/mod/assign/adminlib.php:481 PHP Notice: Undefined property: stdClass::$assignment_maxbytes in /var/www/int/msint/mod/assignment/settings.php on line 10 PHP Stack trace: PHP 1. {main}() /var/www/int/msint/admin/cli/install.php:0 PHP 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 PHP 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 PHP 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 PHP 5. require() /var/www/int/msint/lib/adminlib.php:6379 PHP 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 PHP 7. include() /var/www/int/msint/lib/pluginlib.php:3366 Notice: Undefined property: stdClass::$assignment_maxbytes in /var/www/int/msint/mod/assignment/settings.php on line 10 Call Stack: 0.0010 1020008 1. {main}() /var/www/int/msint/admin/cli/install.php:0 3.2967 56913688 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 96.9812 96956544 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 96.9812 96956704 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 97.8650 97035352 5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379 97.9235 97173312 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 97.9271 97237880 7. include('/var/www/int/msint/mod/assignment/settings.php') /var/www/int/msint/lib/pluginlib.php:3366 PHP Notice: Undefined property: stdClass::$forum_maxbytes in /var/www/int/msint/mod/forum/settings.php on line 49 PHP Stack trace: PHP 1. {main}() /var/www/int/msint/admin/cli/install.php:0 PHP 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 PHP 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 PHP 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 PHP 5. require() /var/www/int/msint/lib/adminlib.php:6379 PHP 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 PHP 7. include() /var/www/int/msint/lib/pluginlib.php:3366 Notice: Undefined property: stdClass::$forum_maxbytes in /var/www/int/msint/mod/forum/settings.php on line 49 Call Stack: 0.0010 1020008 1. {main}() /var/www/int/msint/admin/cli/install.php:0 3.2967 56913688 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 96.9812 96956544 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 96.9812 96956704 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 97.8650 97035352 5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379 98.0667 99636640 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 98.0694 99749600 7. include('/var/www/int/msint/mod/forum/settings.php') /var/www/int/msint/lib/pluginlib.php:3366 PHP Notice: Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/workshop/settings.php on line 51 PHP Stack trace: PHP 1. {main}() /var/www/int/msint/admin/cli/install.php:0 PHP 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 PHP 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 PHP 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 PHP 5. require() /var/www/int/msint/lib/adminlib.php:6379 PHP 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 PHP 7. include() /var/www/int/msint/lib/pluginlib.php:3366 Notice: Undefined property: stdClass::$maxbytes in /var/www/int/msint/mod/workshop/settings.php on line 51 Call Stack: 0.0010 1020008 1. {main}() /var/www/int/msint/admin/cli/install.php:0 3.2967 56913688 2. install_cli_database() /var/www/int/msint/admin/cli/install.php:681 96.9812 96956544 3. admin_apply_default_settings() /var/www/int/msint/lib/installlib.php:487 96.9812 96956704 4. admin_get_root() /var/www/int/msint/lib/adminlib.php:6399 97.8650 97035352 5. require('/var/www/int/msint/admin/settings/plugins.php') /var/www/int/msint/lib/adminlib.php:6379 99.2274 110433400 6. plugininfo_mod->load_settings() /var/www/int/msint/admin/settings/plugins.php:17 99.2301 110533944 7. include('/var/www/int/msint/mod/workshop/settings.php') /var/www/int/msint/lib/pluginlib.php:3366 Getting those errors while installing on mssql. Not sure if they are related to this issue. can be because of MDL-39077 . Stopping test for further investigation.
          Hide
          Damyon Wiese added a comment -

          The fix for MDL-39077 is integrated now - this can be retested.

          Show
          Damyon Wiese added a comment - The fix for MDL-39077 is integrated now - this can be retested.
          Hide
          Ankit Agarwal added a comment -

          Above issue was because of 39077. So continued with testing and getting following failures in phpunit:-

          There were 3 errors:
          
          1) dml_testcase::test_concurent_transactions
          dml_read_exception: Error reading from database (Changed database context to 'ankit_int_master'.
          SELECT COUNT('x') FROM phpu_test_table 
          [array (
          )])
          
          /var/www/int/msint/lib/dml/moodle_database.php:423
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:722
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:756
          /var/www/int/msint/lib/dml/moodle_database.php:1397
          /var/www/int/msint/lib/dml/moodle_database.php:1470
          /var/www/int/msint/lib/dml/moodle_database.php:1641
          /var/www/int/msint/lib/dml/moodle_database.php:1624
          /var/www/int/msint/lib/dml/moodle_database.php:1607
          /var/www/int/msint/lib/dml/tests/dml_test.php:4651
          /var/www/int/msint/lib/phpunit/classes/database_driver_testcase.php:143
          
          To re-run:
           /usr/bin/phpunit --debug --verbose dml_testcase lib/dml/tests/dml_test.php
          
          2) question_usage_autosave_test::test_autosave_and_save_concurrently
          dml_read_exception: Error reading from database (
          
          SELECT
              quba.id AS qubaid,
              quba.contextid,
              quba.component,
              quba.preferredbehaviour,
              qa.id AS questionattemptid,
              qa.questionusageid,
              qa.slot,
              qa.behaviour,
              qa.questionid,
              qa.variant,
              qa.maxmark,
              qa.minfraction,
              qa.flagged,
              qa.questionsummary,
              qa.rightanswer,
              qa.responsesummary,
              qa.timemodified,
              qas.id AS attemptstepid,
              qas.sequencenumber,
              qas.state,
              qas.fraction,
              qas.timecreated,
              qas.userid,
              qasd.name,
              qasd.value
          
          FROM      phpu_question_usages            quba
          LEFT JOIN phpu_question_attempts          qa   ON qa.questionusageid    = quba.id
          LEFT JOIN phpu_question_attempt_steps     qas  ON qas.questionattemptid = qa.id
          LEFT JOIN phpu_question_attempt_step_data qasd ON qasd.attemptstepid    = qas.id
          
          WHERE
              quba.id = ?
          
          ORDER BY
              qa.slot,
              qas.sequencenumber
              
          [array (
            0 => '1',
          )])
          
          /var/www/int/msint/lib/dml/moodle_database.php:423
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:722
          /var/www/int/msint/question/engine/datalib.php:344
          /var/www/int/msint/question/engine/lib.php:79
          /var/www/int/msint/question/engine/tests/helpers.php:731
          /var/www/int/msint/question/engine/tests/questionusage_autosave_test.php:488
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose question_usage_autosave_test question/engine/tests/questionusage_autosave_test.php
          
          3) question_usage_autosave_test::test_concurrent_autosaves
          dml_read_exception: Error reading from database (
          
          SELECT
              quba.id AS qubaid,
              quba.contextid,
              quba.component,
              quba.preferredbehaviour,
              qa.id AS questionattemptid,
              qa.questionusageid,
              qa.slot,
              qa.behaviour,
              qa.questionid,
              qa.variant,
              qa.maxmark,
              qa.minfraction,
              qa.flagged,
              qa.questionsummary,
              qa.rightanswer,
              qa.responsesummary,
              qa.timemodified,
              qas.id AS attemptstepid,
              qas.sequencenumber,
              qas.state,
              qas.fraction,
              qas.timecreated,
              qas.userid,
              qasd.name,
              qasd.value
          
          FROM      phpu_question_usages            quba
          LEFT JOIN phpu_question_attempts          qa   ON qa.questionusageid    = quba.id
          LEFT JOIN phpu_question_attempt_steps     qas  ON qas.questionattemptid = qa.id
          LEFT JOIN phpu_question_attempt_step_data qasd ON qasd.attemptstepid    = qas.id
          
          WHERE
              quba.id = ?
          
          ORDER BY
              qa.slot,
              qas.sequencenumber
              
          [array (
            0 => '1',
          )])
          
          /var/www/int/msint/lib/dml/moodle_database.php:423
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
          /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:722
          /var/www/int/msint/question/engine/datalib.php:344
          /var/www/int/msint/question/engine/lib.php:79
          /var/www/int/msint/question/engine/tests/helpers.php:731
          /var/www/int/msint/question/engine/tests/questionusage_autosave_test.php:559
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose question_usage_autosave_test question/engine/tests/questionusage_autosave_test.php
          
          --
          
          
          There were 4 failures:
          
          1) dml_testcase::test_sql_like
          Failed asserting that 2 matches expected 1.
          
          /var/www/int/msint/lib/dml/tests/dml_test.php:3690
          /var/www/int/msint/lib/phpunit/classes/database_driver_testcase.php:143
          
          To re-run:
           /usr/bin/phpunit --debug --verbose dml_testcase lib/dml/tests/dml_test.php
          
          2) coursecatlib_testcase::test_get_search_courses
          Failed asserting that two arrays are equal.
          --- Expected
          +++ Actual
          @@ @@
           Array (
          -    0 => '5'
          -    1 => '4'
          -    2 => '2'
          -    3 => '9'
          -    4 => '6'
           )
          
          /var/www/int/msint/lib/tests/coursecatlib_test.php:421
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose coursecatlib_testcase lib/tests/coursecatlib_test.php
          
          3) collatorlib_testcase::test_asort
          Failed asserting that Array (
              0 => 'Aac'
              1 => 'aac'
              2 => 'cc'
          ) is identical to Array (
              0 => 'aac'
              1 => 'Aac'
              2 => 'cc'
          ).
          
          /var/www/int/msint/lib/tests/textlib_test.php:459
          /var/www/int/msint/lib/phpunit/classes/basic_testcase.php:64
          
          To re-run:
           /usr/bin/phpunit --debug --verbose collatorlib_testcase lib/tests/textlib_test.php
          
          4) data_advanced_search_sql_test::test_advanced_search_sql_section
          Failed asserting that two arrays are equal.
          --- Expected
          +++ Actual
          @@ @@
           Array (
          -    0 => '6'
           )
          
          /var/www/int/msint/mod/data/tests/search_test.php:205
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose data_advanced_search_sql_test mod/data/tests/search_test.php
          
          There were 6 skipped tests:
          
          1) auth_ldap_testcase::test_auth_ldap
          External LDAP test server not configured.
          
          /var/www/int/msint/auth/ldap/tests/ldap_test.php:52
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose auth_ldap_testcase auth/ldap/tests/ldap_test.php
          
          2) cachestore_memcache_test::test_test_instance
          Could not test cachestore_memcache. Requirements are not met.
          
          /var/www/int/msint/cache/tests/fixtures/stores.php:51
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose cachestore_memcache_test cache/stores/memcache/tests/memcache_test.php
          
          3) cachestore_memcached_test::test_test_instance
          Could not test cachestore_memcached. Requirements are not met.
          
          /var/www/int/msint/cache/tests/fixtures/stores.php:51
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose cachestore_memcached_test cache/stores/memcached/tests/memcached_test.php
          
          4) cachestore_mongodb_test::test_test_instance
          Could not test cachestore_mongodb. Requirements are not met.
          
          /var/www/int/msint/cache/tests/fixtures/stores.php:51
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose cachestore_mongodb_test cache/stores/mongodb/tests/mongodb_test.php
          
          5) enrol_ldap_testcase::test_enrol_ldap
          External LDAP test server not configured.
          
          /var/www/int/msint/enrol/ldap/tests/ldap_test.php:55
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose enrol_ldap_testcase enrol/ldap/tests/ldap_test.php
          
          6) tool_behat_testcase::test_config_file_contents
          Behat not installed.
          
          /var/www/int/msint/admin/tool/behat/tests/tool_behat_test.php:150
          /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76
          
          To re-run:
           /usr/bin/phpunit --debug --verbose tool_behat_testcase admin/tool/behat/tests/tool_behat_test.php
          
          FAILURES!
          Tests: 1805, Assertions: 31596, Failures: 4, Errors: 3, Skipped: 6.
          PERF:  time: 1228.383361s memory_total: 454938120B (433.9MB) memory_growth: 447608616B (426.9MB) memory_peak: 455319192B (434.2MB) includecount: 2229 contextswithfilters: 0 filterscreated: 0 textsfiltered: 0 stringsfiltered: 0 langcountgetstring: 15388 includedyuimodules: 0 includedjsmodules: 2 logwrites: 593 db reads/writes: 133079/82384 ticks: 122849 user: 48468 sys: 2990 cuser: 18 csys: 11 serverload: 0.94 Caches used (hits/misses/sets): core/string {** static persist **(15118/4663/0) cachestore_file(1/4662/4662) } adhoc/core_plugintypes {cachestore_dummy(0/71487/142974) cachestore_static(11150/1/2) } adhoc/core_pluginlist {cachestore_dummy(0/218127/218127) cachestore_static(6081/41/41) } core/databasemeta {** static persist **(110496/7925/0) cachestore_file(1/7924/7925) } core/config {** static persist **(1706/1348/0) cachestore_file(24/1324/1322) } core/coursecat {cachestore_session(0/245/546) **static session**(16/293/301) } core/eventinvalidation {cachestore_file(0/3/1417) ** static persist **(2/4/0) } core/coursecattree {** static persist **(8/275/0) cachestore_file(6/269/361) } core/coursecatrecords {** static persist **(25/147/0) cachestore_static(0/147/146) } adhoc/core_password_compat {cachestore_file(62/8/8) } core/repositories {** static persist **(94/103/0) cachestore_static(40/63/79) } core/yuimodules {cachestore_file(0/50/50) } core/groupdata {** static persist **(35/32/0) cachestore_file(0/32/32) } core/htmlpurifier {cachestore_file(19/70/70) } core/plugininfo_base {** static persist **(3435/19/0) cachestore_file(0/19/765) } core/plugininfo_mod {** static persist **(98/2/0) cachestore_file(0/2/2) } core/plugininfo_block {** static persist **(78/2/0) cachestore_file(0/2/2) } core/plugininfo_filter {** static persist **(0/2/0) cachestore_file(0/2/2) } core/questiondata {cachestore_file(24/10/10) } core/plugintypes {** static persist **(1571/41/0) cachestore_file(1/40/80) } core/pluginlist {** static persist **(201/1691/0) cachestore_file(51/1640/1640) } adhoc/phpunit_applicationtest {cachestore_file(19/5/15) **static session**(25/8/13) cachestore_session(0/0/25) cachestore_static(19/5/15) } phpunit/test_default_application_cache {** static persist **(25/9/0) cachestore_file(0/5/15) } phpunit/nostoretest1 {cachestore_dummy(19/5/15) } phpunit/nostoretest2 {** static persist **(25/9/0) cachestore_dummy(0/5/15) } phpunit/datasourcetest {cachestore_file(0/1/5) } phpunit/overridetest {cachestore_file(1/0/1) } phpunit/test {cachestore_file(2/0/2) } phpunit/simplekeytest {cachestore_file(4/0/4) } phpunit/ttltest {cachestore_file(1/1/4) **static session**(6/1/1) cachestore_session(0/0/3) } phpunit/lockingtest {cachestore_file(0/0/4) } phpunit/eventinvalidationtest {cachestore_file(9/7/7) } phpunit/test_session_event_invalidation {cachestore_session(0/1/7) **static session**(3/4/4) } phpunit/definitioninvalidation {cachestore_file(4/4/4) } phpunit/test_session_definition_invalidation {**static session**(4/4/4) cachestore_session(0/1/8) } phpunit/eventpurgetest {cachestore_file(2/3/3) cachestore_session(0/1/4) **static session**(2/3/3) } phpunit/eventpurgetestpersistent {** static persist **(2/3/0) cachestore_file(0/3/3) cachestore_session(0/1/4) **static session**(2/3/3) } phpunit/definitionpurgetest {cachestore_file(3/3/3) } phpunit/disabletest {cachestore_file(1/1/1) cachestore_dummy(1/1/1) } phpunit/multi_loader {cachestore_file(1/6/3) } adhoc/phpunit_sessioncache {**static session**(1/1/1) cachestore_session(0/0/1) } phpunit/testappsession {**static session**(1/1/1) cachestore_session(0/0/1) } phpunit/testsess1 {**static session**(1/0/1) cachestore_session(0/0/2) } phpunit/testsess2 {**static session**(1/0/1) cachestore_session(0/0/1) } adhoc/phpunit_sessioncache1 {**static session**(1/1/1) cachestore_session(0/0/1) } adhoc/phpunit_sessioncache2 {**static session**(1/1/1) cachestore_session(0/0/1) } phpunit/test_application_locking {cachestore_file(0/0/3) ** static persist **(3/0/0) } core/calendar_subscriptions {cachestore_file(0/0/2) ** static persist **(2/0/0) } . 
          PHP Notice:  Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746
          PHP Stack trace:
          PHP   1. {main}() /usr/bin/phpunit:0
          PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
          PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
          PHP   4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0
          PHP   5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144
          PHP   6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227
          PHP   7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340
          PHP   8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281
          PHP   9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365
          PHP  10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
          PHP  11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423
          PHP  12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140
          PHP  13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70
          PHP  14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138
          PHP  15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835
          
          Notice: Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746
          
          Call Stack:
              0.0001     639192   1. {main}() /usr/bin/phpunit:0
              0.0039    2005920   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
              0.0039    2006936   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
           1228.4387  455449680   4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0
           1228.4387  455449680   5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144
           1228.4387  455449680   6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227
           1228.4387  455449760   7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340
           1228.4387  455449760   8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281
           1228.4388  455450608   9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365
           1228.4388  455450608  10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
           1228.4388  455469080  11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423
           1228.4388  455469472  12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140
           1228.4388  455469744  13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70
           1228.4389  455470120  14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138
           1228.4389  455470464  15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835
          
          PHP Notice:  Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746
          PHP Stack trace:
          PHP   1. {main}() /usr/bin/phpunit:0
          PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
          PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
          PHP   4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0
          PHP   5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144
          PHP   6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227
          PHP   7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340
          PHP   8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281
          PHP   9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365
          PHP  10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
          PHP  11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423
          PHP  12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140
          PHP  13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70
          PHP  14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138
          PHP  15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835
          
          Notice: Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746
          
          Call Stack:
              0.0001     639192   1. {main}() /usr/bin/phpunit:0
              0.0039    2005920   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
              0.0039    2006936   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
           1228.4398  455408184   4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0
           1228.4398  455408184   5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144
           1228.4398  455408184   6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227
           1228.4398  455408264   7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340
           1228.4398  455408264   8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281
           1228.4398  455409136   9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365
           1228.4398  455409136  10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256
           1228.4399  455427608  11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423
           1228.4399  455428000  12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140
           1228.4399  455428272  13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70
           1228.4399  455428648  14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138
           1228.4399  455428784  15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835
          

          collatorlib_testcase::test_asort is because of my db setup which has collation bin.
          test_get_serach_courses has already been reported on MDL-38754. I cannot find any other issues in tracker.

          Show
          Ankit Agarwal added a comment - Above issue was because of 39077. So continued with testing and getting following failures in phpunit:- There were 3 errors: 1) dml_testcase::test_concurent_transactions dml_read_exception: Error reading from database (Changed database context to 'ankit_int_master'. SELECT COUNT('x') FROM phpu_test_table [array ( )]) /var/www/int/msint/lib/dml/moodle_database.php:423 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:722 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:756 /var/www/int/msint/lib/dml/moodle_database.php:1397 /var/www/int/msint/lib/dml/moodle_database.php:1470 /var/www/int/msint/lib/dml/moodle_database.php:1641 /var/www/int/msint/lib/dml/moodle_database.php:1624 /var/www/int/msint/lib/dml/moodle_database.php:1607 /var/www/int/msint/lib/dml/tests/dml_test.php:4651 /var/www/int/msint/lib/phpunit/classes/database_driver_testcase.php:143 To re-run: /usr/bin/phpunit --debug --verbose dml_testcase lib/dml/tests/dml_test.php 2) question_usage_autosave_test::test_autosave_and_save_concurrently dml_read_exception: Error reading from database ( SELECT quba.id AS qubaid, quba.contextid, quba.component, quba.preferredbehaviour, qa.id AS questionattemptid, qa.questionusageid, qa.slot, qa.behaviour, qa.questionid, qa.variant, qa.maxmark, qa.minfraction, qa.flagged, qa.questionsummary, qa.rightanswer, qa.responsesummary, qa.timemodified, qas.id AS attemptstepid, qas.sequencenumber, qas.state, qas.fraction, qas.timecreated, qas.userid, qasd.name, qasd.value FROM phpu_question_usages quba LEFT JOIN phpu_question_attempts qa ON qa.questionusageid = quba.id LEFT JOIN phpu_question_attempt_steps qas ON qas.questionattemptid = qa.id LEFT JOIN phpu_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id WHERE quba.id = ? ORDER BY qa.slot, qas.sequencenumber [array ( 0 => '1', )]) /var/www/int/msint/lib/dml/moodle_database.php:423 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:722 /var/www/int/msint/question/engine/datalib.php:344 /var/www/int/msint/question/engine/lib.php:79 /var/www/int/msint/question/engine/tests/helpers.php:731 /var/www/int/msint/question/engine/tests/questionusage_autosave_test.php:488 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose question_usage_autosave_test question/engine/tests/questionusage_autosave_test.php 3) question_usage_autosave_test::test_concurrent_autosaves dml_read_exception: Error reading from database ( SELECT quba.id AS qubaid, quba.contextid, quba.component, quba.preferredbehaviour, qa.id AS questionattemptid, qa.questionusageid, qa.slot, qa.behaviour, qa.questionid, qa.variant, qa.maxmark, qa.minfraction, qa.flagged, qa.questionsummary, qa.rightanswer, qa.responsesummary, qa.timemodified, qas.id AS attemptstepid, qas.sequencenumber, qas.state, qas.fraction, qas.timecreated, qas.userid, qasd.name, qasd.value FROM phpu_question_usages quba LEFT JOIN phpu_question_attempts qa ON qa.questionusageid = quba.id LEFT JOIN phpu_question_attempt_steps qas ON qas.questionattemptid = qa.id LEFT JOIN phpu_question_attempt_step_data qasd ON qasd.attemptstepid = qas.id WHERE quba.id = ? ORDER BY qa.slot, qas.sequencenumber [array ( 0 => '1', )]) /var/www/int/msint/lib/dml/moodle_database.php:423 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:722 /var/www/int/msint/question/engine/datalib.php:344 /var/www/int/msint/question/engine/lib.php:79 /var/www/int/msint/question/engine/tests/helpers.php:731 /var/www/int/msint/question/engine/tests/questionusage_autosave_test.php:559 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose question_usage_autosave_test question/engine/tests/questionusage_autosave_test.php -- There were 4 failures: 1) dml_testcase::test_sql_like Failed asserting that 2 matches expected 1. /var/www/int/msint/lib/dml/tests/dml_test.php:3690 /var/www/int/msint/lib/phpunit/classes/database_driver_testcase.php:143 To re-run: /usr/bin/phpunit --debug --verbose dml_testcase lib/dml/tests/dml_test.php 2) coursecatlib_testcase::test_get_search_courses Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( - 0 => '5' - 1 => '4' - 2 => '2' - 3 => '9' - 4 => '6' ) /var/www/int/msint/lib/tests/coursecatlib_test.php:421 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose coursecatlib_testcase lib/tests/coursecatlib_test.php 3) collatorlib_testcase::test_asort Failed asserting that Array ( 0 => 'Aac' 1 => 'aac' 2 => 'cc' ) is identical to Array ( 0 => 'aac' 1 => 'Aac' 2 => 'cc' ). /var/www/int/msint/lib/tests/textlib_test.php:459 /var/www/int/msint/lib/phpunit/classes/basic_testcase.php:64 To re-run: /usr/bin/phpunit --debug --verbose collatorlib_testcase lib/tests/textlib_test.php 4) data_advanced_search_sql_test::test_advanced_search_sql_section Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ Array ( - 0 => '6' ) /var/www/int/msint/mod/data/tests/search_test.php:205 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose data_advanced_search_sql_test mod/data/tests/search_test.php There were 6 skipped tests: 1) auth_ldap_testcase::test_auth_ldap External LDAP test server not configured. /var/www/int/msint/auth/ldap/tests/ldap_test.php:52 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose auth_ldap_testcase auth/ldap/tests/ldap_test.php 2) cachestore_memcache_test::test_test_instance Could not test cachestore_memcache. Requirements are not met. /var/www/int/msint/cache/tests/fixtures/stores.php:51 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose cachestore_memcache_test cache/stores/memcache/tests/memcache_test.php 3) cachestore_memcached_test::test_test_instance Could not test cachestore_memcached. Requirements are not met. /var/www/int/msint/cache/tests/fixtures/stores.php:51 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose cachestore_memcached_test cache/stores/memcached/tests/memcached_test.php 4) cachestore_mongodb_test::test_test_instance Could not test cachestore_mongodb. Requirements are not met. /var/www/int/msint/cache/tests/fixtures/stores.php:51 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose cachestore_mongodb_test cache/stores/mongodb/tests/mongodb_test.php 5) enrol_ldap_testcase::test_enrol_ldap External LDAP test server not configured. /var/www/int/msint/enrol/ldap/tests/ldap_test.php:55 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose enrol_ldap_testcase enrol/ldap/tests/ldap_test.php 6) tool_behat_testcase::test_config_file_contents Behat not installed. /var/www/int/msint/admin/tool/behat/tests/tool_behat_test.php:150 /var/www/int/msint/lib/phpunit/classes/advanced_testcase.php:76 To re-run: /usr/bin/phpunit --debug --verbose tool_behat_testcase admin/tool/behat/tests/tool_behat_test.php FAILURES! Tests: 1805, Assertions: 31596, Failures: 4, Errors: 3, Skipped: 6. PERF: time: 1228.383361s memory_total: 454938120B (433.9MB) memory_growth: 447608616B (426.9MB) memory_peak: 455319192B (434.2MB) includecount: 2229 contextswithfilters: 0 filterscreated: 0 textsfiltered: 0 stringsfiltered: 0 langcountgetstring: 15388 includedyuimodules: 0 includedjsmodules: 2 logwrites: 593 db reads/writes: 133079/82384 ticks: 122849 user: 48468 sys: 2990 cuser: 18 csys: 11 serverload: 0.94 Caches used (hits/misses/sets): core/string {** static persist **(15118/4663/0) cachestore_file(1/4662/4662) } adhoc/core_plugintypes {cachestore_dummy(0/71487/142974) cachestore_static(11150/1/2) } adhoc/core_pluginlist {cachestore_dummy(0/218127/218127) cachestore_static(6081/41/41) } core/databasemeta {** static persist **(110496/7925/0) cachestore_file(1/7924/7925) } core/config {** static persist **(1706/1348/0) cachestore_file(24/1324/1322) } core/coursecat {cachestore_session(0/245/546) **static session**(16/293/301) } core/eventinvalidation {cachestore_file(0/3/1417) ** static persist **(2/4/0) } core/coursecattree {** static persist **(8/275/0) cachestore_file(6/269/361) } core/coursecatrecords {** static persist **(25/147/0) cachestore_static(0/147/146) } adhoc/core_password_compat {cachestore_file(62/8/8) } core/repositories {** static persist **(94/103/0) cachestore_static(40/63/79) } core/yuimodules {cachestore_file(0/50/50) } core/groupdata {** static persist **(35/32/0) cachestore_file(0/32/32) } core/htmlpurifier {cachestore_file(19/70/70) } core/plugininfo_base {** static persist **(3435/19/0) cachestore_file(0/19/765) } core/plugininfo_mod {** static persist **(98/2/0) cachestore_file(0/2/2) } core/plugininfo_block {** static persist **(78/2/0) cachestore_file(0/2/2) } core/plugininfo_filter {** static persist **(0/2/0) cachestore_file(0/2/2) } core/questiondata {cachestore_file(24/10/10) } core/plugintypes {** static persist **(1571/41/0) cachestore_file(1/40/80) } core/pluginlist {** static persist **(201/1691/0) cachestore_file(51/1640/1640) } adhoc/phpunit_applicationtest {cachestore_file(19/5/15) **static session**(25/8/13) cachestore_session(0/0/25) cachestore_static(19/5/15) } phpunit/test_default_application_cache {** static persist **(25/9/0) cachestore_file(0/5/15) } phpunit/nostoretest1 {cachestore_dummy(19/5/15) } phpunit/nostoretest2 {** static persist **(25/9/0) cachestore_dummy(0/5/15) } phpunit/datasourcetest {cachestore_file(0/1/5) } phpunit/overridetest {cachestore_file(1/0/1) } phpunit/test {cachestore_file(2/0/2) } phpunit/simplekeytest {cachestore_file(4/0/4) } phpunit/ttltest {cachestore_file(1/1/4) **static session**(6/1/1) cachestore_session(0/0/3) } phpunit/lockingtest {cachestore_file(0/0/4) } phpunit/eventinvalidationtest {cachestore_file(9/7/7) } phpunit/test_session_event_invalidation {cachestore_session(0/1/7) **static session**(3/4/4) } phpunit/definitioninvalidation {cachestore_file(4/4/4) } phpunit/test_session_definition_invalidation {**static session**(4/4/4) cachestore_session(0/1/8) } phpunit/eventpurgetest {cachestore_file(2/3/3) cachestore_session(0/1/4) **static session**(2/3/3) } phpunit/eventpurgetestpersistent {** static persist **(2/3/0) cachestore_file(0/3/3) cachestore_session(0/1/4) **static session**(2/3/3) } phpunit/definitionpurgetest {cachestore_file(3/3/3) } phpunit/disabletest {cachestore_file(1/1/1) cachestore_dummy(1/1/1) } phpunit/multi_loader {cachestore_file(1/6/3) } adhoc/phpunit_sessioncache {**static session**(1/1/1) cachestore_session(0/0/1) } phpunit/testappsession {**static session**(1/1/1) cachestore_session(0/0/1) } phpunit/testsess1 {**static session**(1/0/1) cachestore_session(0/0/2) } phpunit/testsess2 {**static session**(1/0/1) cachestore_session(0/0/1) } adhoc/phpunit_sessioncache1 {**static session**(1/1/1) cachestore_session(0/0/1) } adhoc/phpunit_sessioncache2 {**static session**(1/1/1) cachestore_session(0/0/1) } phpunit/test_application_locking {cachestore_file(0/0/3) ** static persist **(3/0/0) } core/calendar_subscriptions {cachestore_file(0/0/2) ** static persist **(2/0/0) } . PHP Notice: Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746 PHP Stack trace: PHP 1. {main}() /usr/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129 PHP 4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0 PHP 5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144 PHP 6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227 PHP 7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340 PHP 8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281 PHP 9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365 PHP 10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 PHP 11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423 PHP 12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140 PHP 13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70 PHP 14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138 PHP 15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835 Notice: Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746 Call Stack: 0.0001 639192 1. {main}() /usr/bin/phpunit:0 0.0039 2005920 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 0.0039 2006936 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129 1228.4387 455449680 4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0 1228.4387 455449680 5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144 1228.4387 455449680 6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227 1228.4387 455449760 7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340 1228.4387 455449760 8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281 1228.4388 455450608 9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365 1228.4388 455450608 10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 1228.4388 455469080 11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423 1228.4388 455469472 12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140 1228.4388 455469744 13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70 1228.4389 455470120 14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138 1228.4389 455470464 15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835 PHP Notice: Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746 PHP Stack trace: PHP 1. {main}() /usr/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129 PHP 4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0 PHP 5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144 PHP 6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227 PHP 7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340 PHP 8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281 PHP 9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365 PHP 10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 PHP 11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423 PHP 12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140 PHP 13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70 PHP 14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138 PHP 15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835 Notice: Trying to get property of non-object in /var/www/int/msint/lib/moodlelib.php on line 6746 Call Stack: 0.0001 639192 1. {main}() /usr/bin/phpunit:0 0.0039 2005920 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 0.0039 2006936 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129 1228.4398 455408184 4. moodle_database->__destruct() /var/www/int/msint/lib/dml/moodle_database.php:0 1228.4398 455408184 5. mssql_native_moodle_database->dispose() /var/www/int/msint/lib/dml/moodle_database.php:144 1228.4398 455408184 6. moodle_database->dispose() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:227 1228.4398 455408264 7. moodle_database->force_transaction_rollback() /var/www/int/msint/lib/dml/moodle_database.php:340 1228.4398 455408264 8. mssql_native_moodle_database->rollback_transaction() /var/www/int/msint/lib/dml/moodle_database.php:2281 1228.4398 455409136 9. mssql_native_moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:1365 1228.4398 455409136 10. moodle_database->query_end() /var/www/int/msint/lib/dml/mssql_native_moodle_database.php:256 1228.4399 455427608 11. dml_read_exception->__construct() /var/www/int/msint/lib/dml/moodle_database.php:423 1228.4399 455428000 12. dml_exception->__construct() /var/www/int/msint/lib/dmllib.php:140 1228.4399 455428272 13. moodle_exception->__construct() /var/www/int/msint/lib/dmllib.php:70 1228.4399 455428648 14. core_string_manager->string_exists() /var/www/int/msint/lib/setuplib.php:138 1228.4399 455428784 15. core_string_manager->load_component_strings() /var/www/int/msint/lib/moodlelib.php:6835 collatorlib_testcase::test_asort is because of my db setup which has collation bin. test_get_serach_courses has already been reported on MDL-38754 . I cannot find any other issues in tracker.
          Hide
          Ankit Agarwal added a comment -

          Ok most things got resolved once I used CS_AS as collation still getting the notices and dml read exception error. The errors might be related to freetds as suggested by MDL-39019 . Also unit tests all passed without errors for Damyon and Michael, so am assuming this is just my setup.
          question_usage_autosave_test is the one generating notices when an dml exception is thrown. I will investigate this further and create a issue if needed.
          Rest stuff went as described for mssql.

          so in all I guess this test can be passed.
          Thanks

          Show
          Ankit Agarwal added a comment - Ok most things got resolved once I used CS_AS as collation still getting the notices and dml read exception error. The errors might be related to freetds as suggested by MDL-39019 . Also unit tests all passed without errors for Damyon and Michael, so am assuming this is just my setup. question_usage_autosave_test is the one generating notices when an dml exception is thrown. I will investigate this further and create a issue if needed. Rest stuff went as described for mssql. so in all I guess this test can be passed. Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Just for reference, ensure that all the commands detailed @ http://docs.moodle.org/24/en/Installing_MSSQL_for_PHP#Installation_overview (specially the 4th one, it defines how transactions must behave) are executed each time a new, blank DB is created.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Just for reference, ensure that all the commands detailed @ http://docs.moodle.org/24/en/Installing_MSSQL_for_PHP#Installation_overview (specially the 4th one, it defines how transactions must behave) are executed each time a new, blank DB is created. Ciao
          Hide
          Ankit Agarwal added a comment -

          Created MDL-39466 as suggested by Eloy for the notices.
          Thanks

          Show
          Ankit Agarwal added a comment - Created MDL-39466 as suggested by Eloy for the notices. Thanks
          Hide
          Dan Poltawski added a comment -

          Thanks! You're changes are now spread to the world through this git and our source control repositories.

          No time to rest though, we've got days to make 2.5 the best yet!

          ciao

          Show
          Dan Poltawski added a comment - Thanks! You're changes are now spread to the world through this git and our source control repositories. No time to rest though, we've got days to make 2.5 the best yet! ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: