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

Cohort report stress tests fail on Oracle

    XMLWordPrintable

Details

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      Test on Oracle

      1. Add the following to you site config.php:

        define('PHPUNIT_LONGTEST', true);
        

      2. Ensure the following tests pass:

        $ bin/moodle-docker-compose exec webserver vendor/bin/phpunit cohort/tests/reportbuilder/datasource/cohorts_test.php
        

      Show
      Test on Oracle Add the following to you site config.php : define('PHPUNIT_LONGTEST', true); Ensure the following tests pass: $ bin/moodle-docker-compose exec webserver vendor/bin/phpunit cohort/tests/reportbuilder/datasource/cohorts_test.php

    Description

      Regression from MDL-73141

      We can't compare text columns directly in Oracle, they should be first cast appropriately (same as this change)

      $ bin/moodle-docker-compose exec webserver vendor/bin/phpunit cohort/tests/reportbuilder/datasource/cohorts_test.php
      Compose v2 is not available in Docker CLI, falling back to use docker-compose script
      Moodle 4.1dev+ (Build: 20221101), 720bd60fc60e1413b61c54c00a5561b62e685b15
      Php: 7.4.32, oci: 21.0.0.0.0, OS: Linux 4.15.0-142-generic x86_64
      PHPUnit 9.5.25 #StandWithUkraine
       
      ...F                                                                4 / 4 (100%)
       
      Time: 00:05.411, Memory: 70.50 MB
       
      There was 1 failure:
       
      1) core_cohort\reportbuilder\datasource\cohorts_test::test_stress_datasource
      Error for condition 'cohort:description': Error reading from database (ORA-00932: inconsistent datatypes: expected - got CLOB
       
                  SELECT COUNT(1)
                    FROM (SELECT c.name AS c0_name
                            FROM t_cohort c 
                           WHERE (LOWER(c.description) = LOWER(:o_rbparam9))
                                 
                         ) rbalias207
      [array (
        'o_rbparam9' => 'test',
      )])
       
      /var/www/html/reportbuilder/tests/helpers.php:172
      /var/www/html/cohort/tests/reportbuilder/datasource/cohorts_test.php:154
      /var/www/html/lib/phpunit/classes/advanced_testcase.php:80
       
      FAILURES!
      Tests: 4, Assertions: 211, Failures: 1
      

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Ilya Tregubov Ilya Tregubov
              Shamim Rezaie Shamim Rezaie
              Simey Lameze Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 24 minutes
                  1h 24m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.