Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Unit tests
    • Labels:

      Description

      Done:

      • completionlib
      • new exit code constants
      • improved diagnostic message for missing DbUnit extension
      • remove @ silencing from diagnostic includes
      • fixed paths in windows phpunit configuration files
      • improved module generators - triggering gradebook and events changes now

      todo:

      • hide simpletest UI
      • delete all converted simpletests
      • webservices - it must be completely redesigned to not rely on HTTP

      notes:

      • I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs

        Gliffy Diagrams

          Issue Links

            Activity

            skodak Petr Skoda created issue -
            skodak Petr Skoda made changes -
            Field Original Value New Value
            Link This issue has been marked as being related by MDL-32323 [ MDL-32323 ]
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            skodak Petr Skoda made changes -
            Fix Version/s DEV backlog [ 10464 ]
            Priority Minor [ 4 ] Critical [ 2 ]
            Labels triaged
            Assignee Eloy Lafuente (stronk7) [ stronk7 ] Petr Škoda (skodak) [ skodak ]
            skodak Petr Skoda made changes -
            Status Open [ 1 ] Development in progress [ 3 ]
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited

            Found some problems after trying the phpunit tests, it seems we must (after discussing it with Petr):

            1) make get_tables() to return some details, like "->temp = true|false"
            2) based on those details, use drop_table() or drop_temp_table() in reset_database()
            3) each time that there are tables dropped, inform about it, because each testcase should be responsible of self-dropping custom stuff (no matter if reset_database() does it for you.
            4) add DB functional tests about 1) and 2)

            Investigation continues...

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited Found some problems after trying the phpunit tests, it seems we must (after discussing it with Petr): 1) make get_tables() to return some details, like "->temp = true|false" 2) based on those details, use drop_table() or drop_temp_table() in reset_database() 3) each time that there are tables dropped, inform about it, because each testcase should be responsible of self-dropping custom stuff (no matter if reset_database() does it for you. 4) add DB functional tests about 1) and 2) Investigation continues...
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat
            skodak Petr Skoda made changes -
            Link This issue has a non-specific relationship to MDL-30210 [ MDL-30210 ]
            dobedobedoh Andrew Nicols made changes -
            Link This issue will be resolved by MDL-32426 [ MDL-32426 ]
            skodak Petr Skoda made changes -
            Description todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * completionlib - using mocks heavily
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat
            Done:
            * completionlib


            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib


            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * do not complain about dirroot permissions from webrunner
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * rework if (PHPUNIT_TEST and !PHPUNIT_UTIL) { in lib/setup.php - the problem is we need to reset even in PHPUNIT_UTIL and skip only in diag
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat
            Done:
            * completionlib


            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib


            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat
            Done:
            * completionlib


            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat

            notes:
            * I have decided to not use PHP constants for exit return codes because the codes are used in batch scripts and the constants were actually making it more confusing
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib


            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * show better error message when database support missing
            * remove the @include in util.php
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat

            notes:
            * I have decided to not use PHP constants for exit return codes because the codes are used in batch scripts and the constants were actually making it more confusing
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * use constants in error handling
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Link This issue is blocked by MDL-32434 [ MDL-32434 ]
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * verify dataroot is not shared with production server
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function
            * verify buildconfig works in init.bat

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * in database reset report extra tables to be dropped + deal with temp tables somehow
            * in runBare() ignore reset problems when text failed so that we do not loose the original $e
            * fix paths in windows phpunit.xml generation function

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * fix paths in windows phpunit.xml generation function

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI
            * fix paths in windows phpunit.xml generation function

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - seems to do nothing
            * delete all converted simpletests
            * hide simpletest UI

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - it must be completely redesigned to not rely on HTTP
            * delete all converted simpletests
            * hide simpletest UI

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files

            todo:
            * discuss problem in navigationlib_test.php method test_find_expandable() with SamH
            * webservices - it must be completely redesigned to not rely on HTTP
            * delete all converted simpletests
            * hide simpletest UI

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files

            todo:
            * hide simpletest UI
            * delete all converted simpletests
            * webservices - it must be completely redesigned to not rely on HTTP

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            skodak Petr Skoda made changes -
            Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
            Pull Master Diff URL https://github.com/skodak/moodle/compare/master...w16_MDL-32400_m23_phpunit4
            Pull Master Branch w16_MDL-32400_m23_phpunit4
            Pull from Repository git://github.com/skodak/moodle.git
            Fix Version/s 2.3 [ 10657 ]
            Fix Version/s DEV backlog [ 10464 ]
            Testing Instructions run phpunit tests in all supported dbs
            skodak Petr Skoda made changes -
            Link This issue blocks MDL-32437 [ MDL-32437 ]
            skodak Petr Skoda made changes -
            Description Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files

            todo:
            * hide simpletest UI
            * delete all converted simpletests
            * webservices - it must be completely redesigned to not rely on HTTP

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            Done:
            * completionlib
            * new exit code constants
            * improved diagnostic message for missing DbUnit extension
            * remove @ silencing from diagnostic includes
            * fixed paths in windows phpunit configuration files
            * improved module generators - triggering gradebook and events changes now

            todo:
            * hide simpletest UI
            * delete all converted simpletests
            * webservices - it must be completely redesigned to not rely on HTTP

            notes:
            * I have decided to remove the init.sh and init.bat and keep only init.php, this should simplify maintenance and prevent bugs
            samhemelryk Sam Hemelryk made changes -
            Currently in integration Yes [ 10041 ]
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Just spent some time creating one new option to cli/util.php (--builconfigdist) to create distributed phpunit.xml files one every plugin/susbsystem/directory candidate to have them.

            Useful for cli/ci/ide execution... for your consideration. Feel free to pick the commit (and amend the msg, surely).

            https://github.com/stronk7/moodle/compare/master...buildconfig_spread

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Just spent some time creating one new option to cli/util.php (--builconfigdist) to create distributed phpunit.xml files one every plugin/susbsystem/directory candidate to have them. Useful for cli/ci/ide execution... for your consideration. Feel free to pick the commit (and amend the msg, surely). https://github.com/stronk7/moodle/compare/master...buildconfig_spread Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            One more thing: "phpunit" needs to be declared as proper category @ http://docs.moodle.org/dev/Core_APIs.

            Or we need to use "test" that is the official name right now.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - One more thing: "phpunit" needs to be declared as proper category @ http://docs.moodle.org/dev/Core_APIs . Or we need to use "test" that is the official name right now. Ciao
            Hide
            skodak Petr Skoda added a comment -

            thanks Eloy for the patch - I will review/test it this week after integration, I will have a look at the phpdocs issue too - phpunit stage 5

            Show
            skodak Petr Skoda added a comment - thanks Eloy for the patch - I will review/test it this week after integration, I will have a look at the phpdocs issue too - phpunit stage 5
            poltawski Dan Poltawski made changes -
            Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
            Integrator poltawski
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks Petr, this has been integrated now

            Show
            poltawski Dan Poltawski added a comment - Thanks Petr, this has been integrated now
            poltawski Dan Poltawski made changes -
            Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
            salvetore Michael de Raadt made changes -
            Tester rajeshtaneja
            rajeshtaneja Rajesh Taneja made changes -
            Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
            Hide
            salvetore Michael de Raadt added a comment -

            I'll test this with Oracle shortly.

            Show
            salvetore Michael de Raadt added a comment - I'll test this with Oracle shortly.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            PhpUnit ran fine, but following failed (not related)
            One failure on Postgres, but when ran second time no error appear.

             
            1) courselib_testcase::test_reorder_sections
            Failed asserting that 13 matches expected '6'.
            /var/www/test/course/tests/courselib_test.php:47
            /var/www/test/lib/phpunit/lib.php:1124

            MSSQL

            There were 4 errors:
             
            1) dml_testcase::test_get_records_sql
            mssql_data_seek(): Bad row offset
             
            /var/www/test/lib/dml/mssql_native_moodle_database.php:720
            /var/www/test/lib/dml/mssql_native_moodle_database.php:747
            /var/www/test/lib/dml/tests/dml_test.php:1428
             
            2) dml_testcase::test_concurent_transactions
            dml_read_exception: Error reading from database (
            SELECT COUNT('x') FROM t_test_table 
            [array (
            )])
             
            /var/www/test/lib/dml/moodle_database.php:413
            /var/www/test/lib/dml/mssql_native_moodle_database.php:260
            /var/www/test/lib/dml/mssql_native_moodle_database.php:717
            /var/www/test/lib/dml/mssql_native_moodle_database.php:747
            /var/www/test/lib/dml/moodle_database.php:1341
            /var/www/test/lib/dml/moodle_database.php:1414
            /var/www/test/lib/dml/moodle_database.php:1586
            /var/www/test/lib/dml/moodle_database.php:1569
            /var/www/test/lib/dml/moodle_database.php:1552
            /var/www/test/lib/dml/tests/dml_test.php:4249
             
            3) dml_testcase::test_limits_and_offsets
            mssql_data_seek(): Bad row offset
             
            /var/www/test/lib/dml/mssql_native_moodle_database.php:720
            /var/www/test/lib/dml/mssql_native_moodle_database.php:747
            /var/www/test/lib/dml/tests/dml_test.php:4446

            Oracle
            Segmentation fault (core dumped), I tried running functional db test, but it gave "exit signal Segmentation fault". Seems to be problem with my oracle db setup. Have requested Michael to test this and will pass this after he put his comments

            UTF8 error/failure on all db's. But they seems to be related to my installation so ignoring them.

            4) moodlelib_testcase::test_fix_utf8
            iconv(): Detected an illegal character in input string
             
            /var/www/test/lib/moodlelib.php:1130
            /var/www/test/lib/tests/moodlelib_test.php:315
            /var/www/test/lib/phpunit/lib.php:1124
            There was 1 failure:
            1) dml_testcase::test_sql_binary_equal
            SQL operator "=" is expected to be case sensitive
            Failed asserting that 1 matches expected 2.
             
            /var/www/test/lib/dml/tests/dml_test.php:3456

            Show
            rajeshtaneja Rajesh Taneja added a comment - PhpUnit ran fine, but following failed (not related) One failure on Postgres , but when ran second time no error appear. 1) courselib_testcase::test_reorder_sections Failed asserting that 13 matches expected '6'. /var/www/test/course/tests/courselib_test.php:47 /var/www/test/lib/phpunit/lib.php:1124 MSSQL There were 4 errors:   1) dml_testcase::test_get_records_sql mssql_data_seek(): Bad row offset   /var/www/test/lib/dml/mssql_native_moodle_database.php:720 /var/www/test/lib/dml/mssql_native_moodle_database.php:747 /var/www/test/lib/dml/tests/dml_test.php:1428   2) dml_testcase::test_concurent_transactions dml_read_exception: Error reading from database ( SELECT COUNT('x') FROM t_test_table [array ( )])   /var/www/test/lib/dml/moodle_database.php:413 /var/www/test/lib/dml/mssql_native_moodle_database.php:260 /var/www/test/lib/dml/mssql_native_moodle_database.php:717 /var/www/test/lib/dml/mssql_native_moodle_database.php:747 /var/www/test/lib/dml/moodle_database.php:1341 /var/www/test/lib/dml/moodle_database.php:1414 /var/www/test/lib/dml/moodle_database.php:1586 /var/www/test/lib/dml/moodle_database.php:1569 /var/www/test/lib/dml/moodle_database.php:1552 /var/www/test/lib/dml/tests/dml_test.php:4249   3) dml_testcase::test_limits_and_offsets mssql_data_seek(): Bad row offset   /var/www/test/lib/dml/mssql_native_moodle_database.php:720 /var/www/test/lib/dml/mssql_native_moodle_database.php:747 /var/www/test/lib/dml/tests/dml_test.php:4446 Oracle Segmentation fault (core dumped), I tried running functional db test, but it gave "exit signal Segmentation fault". Seems to be problem with my oracle db setup. Have requested Michael to test this and will pass this after he put his comments UTF8 error/failure on all db's. But they seems to be related to my installation so ignoring them. 4) moodlelib_testcase::test_fix_utf8 iconv(): Detected an illegal character in input string   /var/www/test/lib/moodlelib.php:1130 /var/www/test/lib/tests/moodlelib_test.php:315 /var/www/test/lib/phpunit/lib.php:1124 There was 1 failure: 1) dml_testcase::test_sql_binary_equal SQL operator "=" is expected to be case sensitive Failed asserting that 1 matches expected 2.   /var/www/test/lib/dml/tests/dml_test.php:3456
            Hide
            skodak Petr Skoda added a comment -

            postgresql: weird, please create new report if somebody from HQ manages to reproduce it
            mssql: known problem in mssql, hmmm, we should probably add some custom message and tell ppl that it breaks in mssql
            utf8: could somebody from HQ diagnose and find some solution? I can not do it because it works fine here

            thanks!!

            Show
            skodak Petr Skoda added a comment - postgresql: weird, please create new report if somebody from HQ manages to reproduce it mssql: known problem in mssql, hmmm, we should probably add some custom message and tell ppl that it breaks in mssql utf8: could somebody from HQ diagnose and find some solution? I can not do it because it works fine here thanks!!
            Hide
            poltawski Dan Poltawski added a comment -

            The utf8 problem is plaguing most of us at HQ. The PG problem was weird.

            Show
            poltawski Dan Poltawski added a comment - The utf8 problem is plaguing most of us at HQ. The PG problem was weird.
            Hide
            skodak Petr Skoda added a comment -

            http://php.net/manual/en/function.iconv.php clearly says "If you append the string //IGNORE, characters that cannot be represented in the target charset are silently discarded." so I guess this is bug in your installs.

            Show
            skodak Petr Skoda added a comment - http://php.net/manual/en/function.iconv.php clearly says "If you append the string //IGNORE, characters that cannot be represented in the target charset are silently discarded." so I guess this is bug in your installs.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -
            Show
            rajeshtaneja Rajesh Taneja added a comment - It will be nice to update http://docs.moodle.org/22/en/admin/environment/php_extension/iconv
            Hide
            salvetore Michael de Raadt added a comment -

            Results of the Oracle test included a couple of failures, but I don't think either is relevant to this issue.

            Time: 02:37:41, Memory: 143.75Mb
             
            There were 2 failures:
             
            1) dml_testcase::test_sql_concat
            ANSI behaviour: Concatenating NULL must return NULL - But in Oracle :-(. [%s]
            Failed asserting that '123.45test' is null.
             
            D:\xampp\htdocs\moodle_testing_oracle\lib\dml\tests\dml_test.php:3586
            D:\xampp\php\phpunit:46
             
            2) moodlesimplepie_testcase::test_getfeed
            Failed to load the sample RSS file. Please check your proxy settings in Moodle.
            %s
            Failed asserting that 'cURL Error: Operation timed out after 2012 milliseconds w
            ith 30241 out of 32188 bytes received' is null.
             
            D:\xampp\htdocs\moodle_testing_oracle\lib\tests\rsslib_test.php:56
            D:\xampp\htdocs\moodle_testing_oracle\lib\phpunit\lib.php:1058
            D:\xampp\php\phpunit:46
             
            FAILURES!
            Tests: 1070, Assertions: 20535, Failures: 2.

            Show
            salvetore Michael de Raadt added a comment - Results of the Oracle test included a couple of failures, but I don't think either is relevant to this issue. Time: 02:37:41, Memory: 143.75Mb   There were 2 failures:   1) dml_testcase::test_sql_concat ANSI behaviour: Concatenating NULL must return NULL - But in Oracle :-(. [%s] Failed asserting that '123.45test' is null.   D:\xampp\htdocs\moodle_testing_oracle\lib\dml\tests\dml_test.php:3586 D:\xampp\php\phpunit:46   2) moodlesimplepie_testcase::test_getfeed Failed to load the sample RSS file. Please check your proxy settings in Moodle. %s Failed asserting that 'cURL Error: Operation timed out after 2012 milliseconds w ith 30241 out of 32188 bytes received' is null.   D:\xampp\htdocs\moodle_testing_oracle\lib\tests\rsslib_test.php:56 D:\xampp\htdocs\moodle_testing_oracle\lib\phpunit\lib.php:1058 D:\xampp\php\phpunit:46   FAILURES! Tests: 1070, Assertions: 20535, Failures: 2.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Phphunit runs fine on all DB's.
            Passing this test, as reported failures/errors seems to be individual set-up related issues.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Phphunit runs fine on all DB's. Passing this test, as reported failures/errors seems to be individual set-up related issues.
            rajeshtaneja Rajesh Taneja made changes -
            Status Testing in progress [ 10011 ] Tested [ 10006 ]
            Hide
            poltawski Dan Poltawski added a comment -

            Bonza mate!

            Your changes have made it into the Moodle release! Its time to celebrate! Put a shrimp on the barbie and grab a stubby.

            Hooroo

            Show
            poltawski Dan Poltawski added a comment - Bonza mate! Your changes have made it into the Moodle release! Its time to celebrate! Put a shrimp on the barbie and grab a stubby. Hooroo
            poltawski Dan Poltawski made changes -
            Status Tested [ 10006 ] Closed [ 6 ]
            Resolution Fixed [ 1 ]
            Currently in integration Yes [ 10041 ]
            poltawski Dan Poltawski made changes -
            Integration date 19/Apr/12
            skodak Petr Skoda made changes -
            Link This issue blocks MDL-32569 [ MDL-32569 ]
            skodak Petr Skoda made changes -
            Link This issue is duplicated by MDL-21015 [ MDL-21015 ]
            skodak Petr Skoda made changes -
            Link This issue is duplicated by MDL-17644 [ MDL-17644 ]
            skodak Petr Skoda made changes -
            Link This issue is duplicated by MDL-19137 [ MDL-19137 ]
            skodak Petr Skoda made changes -
            Link This issue is duplicated by MDL-28122 [ MDL-28122 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12