Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.5 + Drupal 8.0.x: failed tests + fatal error at the end prevents writing the report! #18

Open
wimleers opened this issue Sep 19, 2014 · 3 comments

Comments

@wimleers
Copy link

In short: the test run ended with a fatal error, and there were many failures in many tests, predominantly in image-related tests (I'm thinking of php-gd there…), but not only.

… fortunately… this fatal error at the end explains why the results directory is empty!

Command:

sudo DCI_DBTYPE='mysql' DCI_DBVER=5.5' DCI_PHPVERSION='5.5' DCI_TESTGROUPS='--all' DCI_DRUPALBRANCH='8.0.x' DCI_CONCURRENCY='16' ./containers/web/run.sh

(This is equivalent to running with DCI_INSTALLER="none".)

This test run ended like this:

Test run duration: 39 min 21 sec


Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 too many SQL variables' in /var/www/core/lib/Drupal/Core/Database/Connection.php:336
Stack trace:
#0 /var/www/core/lib/Drupal/Core/Database/Connection.php(336): PDO->prepare('SELECT * FROM s...')
#1 /var/www/core/lib/Drupal/Core/Database/Connection.php(536): Drupal\Core\Database\Connection->prepareQuery('SELECT * FROM {...')
#2 /var/www/core/scripts/run-tests.sh(913): Drupal\Core\Database\Connection->query('SELECT * FROM {...', Array)
#3 /var/www/core/scripts/run-tests.sh(92): simpletest_script_reporter_write_xml_results()
#4 {main}

Next exception 'Drupal\Core\Database\DatabaseExceptionWrapper' with message 'SQLSTATE[HY000]: General error: 1 too many SQL variables: SELECT * FROM {simpletest} WHERE test_id IN (:test_ids_0, :test_ids_1, :test_ids_2, :test_ids_3, :test_ids_4, :test_ids_5, :test_ids_6, :test_ids_7, :test_ids_8, :test_ids_9, :test_ids_10, :test_ids_11, :test_ids_12, :test_ids_13, :test_ids_14, :test_ids_15, :test_id in /var/www/core/lib/Drupal/Core/Database/Connection.php on line 569
real 2362.40
user 0.04
sys 0.04

Saving image build_2014_09_19_081830 at Fri Sep 19 08:57:53 UTC 2014:
60a82f7bcb1f430a92ba30f634af09fbc7eece6d3ca61c563c83a2ee740e6cb8
------------------------------------------------------------------------------
Results directory: /home/testbot/testbotdata/build_2014_09_19_081830/results/
Clean up old Builds on /home/testbot/testbotdata to save disk space
------------------------------------------------------------------------------
Docker run command:
/usr/bin/time -p docker run --link=drupaltestbot-db-mysql-5.5:db --name=build_2014_09_19_081830 -v=/home/testbot/testbotdata/build_2014_09_19_081830/:/var/workspace:rw -v=/home/testbot/testbotdata/build_2014_09_19_081830/:/var/www:rw -p 80  -t drupalci/web-5.5
@wimleers
Copy link
Author

Note this part in the stack trace above:

#3 /var/www/core/scripts/run-tests.sh(92): simpletest_script_reporter_write_xml_results()

I don't know how this is possible, but that explains why we don't have results :)

@wimleers wimleers changed the title PHP 5.5 + Drupal 8.0.x: fatal error at the end prevents writing the report! PHP 5.5 + Drupal 8.0.x: failed tests + fatal error at the end prevents writing the report! Sep 19, 2014
@ricardoamaro
Copy link
Owner

I've narrowed down to the test groups that are failing:
DCI_TESTGROUPS='rest,image,simpletest'

Xml results are appearing:

ls /home/testbot/testbotdata/build_2014_09_20_120520/results/
Drupal\image\Tests\FileMoveTest.xml                 Drupal\rest\Tests\ReadTest.xml
Drupal\image\Tests\ImageAdminStylesTest.xml         Drupal\rest\Tests\ResourceTest.xml
Drupal\image\Tests\ImageDimensionsTest.xml          Drupal\rest\Tests\UpdateTest.xml
Drupal\image\Tests\ImageEffectsTest.xml             Drupal\rest\Tests\Views\StyleSerializerTest.xml
Drupal\image\Tests\ImageFieldDefaultImagesTest.xml  Drupal\simpletest\Tests\BrokenSetUpTest.xml
Drupal\image\Tests\ImageFieldDisplayTest.xml        Drupal\simpletest\Tests\BrowserTest.xml
Drupal\image\Tests\ImageFieldValidateTest.xml       Drupal\simpletest\Tests\FolderTest.xml
Drupal\image\Tests\ImageItemTest.xml                Drupal\simpletest\Tests\InstallationProfileModuleTestsTest.xml
Drupal\image\Tests\ImageStyleFlushTest.xml          Drupal\simpletest\Tests\KernelTestBaseTest.xml
Drupal\image\Tests\ImageStylesPathAndUrlTest.xml    Drupal\simpletest\Tests\MailCaptureTest.xml
Drupal\image\Tests\ImageThemeFunctionTest.xml       Drupal\simpletest\Tests\MissingCheckedRequirementsTest.xml
Drupal\rest\Tests\AuthTest.xml                      Drupal\simpletest\Tests\OtherInstallationProfileTestsTest.xml
Drupal\rest\Tests\CreateTest.xml                    Drupal\simpletest\Tests\SimpleTestBrowserTest.xml
Drupal\rest\Tests\CsrfTest.xml                      Drupal\simpletest\Tests\SimpleTestTest.xml
Drupal\rest\Tests\DeleteTest.xml                    Drupal\simpletest\Tests\UserHelpersTest.xml
Drupal\rest\Tests\NodeTest.xml

While the Undefined offset error is reproducible:

~/drupalci_testbot$ sudo DCI_DBTYPE='mysql' DCI_DBVER='5.5' DCI_PHPVERSION='5.5' DCI_TESTGROUPS='rest,image,simpletest' DCI_DRUPALBRANCH='8.0.x' DCI_CONCURRENCY='4' DCI_INSTALLER="none" ./containers/web/run.sh
------------------------------------------------------------------------------
Containers: web-5.5 and drupaltestbot-db-mysql-5.5 available
Running PHP5.5/mysql on drupalci/web-5.5 at Sat Sep 20 12:05:20 UTC 2014
------------------------------------------------------------------------------
Local Drupal repo found on /home/testbot/testbotdata/drupal/
Local Drush found on /home/testbot/testbotdata/vendor/drush/drush/drush
Cloning into '/home/testbot/testbotdata/build_2014_09_20_120520'...
done.
Already on '8.0.x'
Your branch is up-to-date with 'origin/8.0.x'.

NOTICE: $DCI_DEPENDENCIES has no modules declared...

NOTICE: $DCI_DEPENDENCIES_GIT has nothing declared...

NOTICE: $DCI_DEPENDENCIES_TGZ has nothing declared...

NOTICE: $DCI_PATCH variable has no patch to apply...

------------------------ ENVIRONMENT VARIABLES IN USE ------------------------
DCI_IDENTIFIER="build_2014_09_20_120520"
DCI_DRUPALBRANCH="8.0.x"
DCI_DRUPALVERSION="8"
DCI_UPDATEREPO="false"
DCI_REPODIR="/home/testbot/testbotdata"
DCI_DRUPALREPO="http://git.drupal.org/project/drupal.git"
DCI_DRUSHREPO="https://github.com/drush-ops/drush.git"
DCI_BUILDSDIR="/home/testbot/testbotdata"
DCI_WORKSPACE="/home/testbot/testbotdata/build_2014_09_20_120520/"
DCI_DEPENDENCIES=""
DCI_DEPENDENCIES_GIT=""
DCI_DEPENDENCIES_TGZ=""
DCI_MODULESPATH="./modules"
DCI_PATCH=""
DCI_DBUSER="drupaltestbot"
DCI_DBPASS="drupaltestbotpw"
DCI_DBTYPE="mysql"
DCI_DBVER="5.5"
DCI_DBCONTAINER="drupaltestbot-db-mysql-5.5"
DCI_DBLINK="--link=drupaltestbot-db-mysql-5.5:db"
DCI_CMD=""
DCI_INTERACTIVE=""
DCI_INSTALLER="none"
DCI_VERBOSE="false"
DCI_PHPVERSION="5.5"
DCI_CONCURRENCY="4"
DCI_RUNSCRIPT="php ./core/scripts/run-tests.sh --php /usr/bin/php --url 'http://localhost' --color --concurrency 4  --xml '/var/workspace/results'"
DCI_TESTGROUPS="rest,image,simpletest"
VERBO=""

------------------------ STARTING DOCKER CONTAINER ---------------------------
Operation [start]...
Starting apache2 service

DCI_DRUPALVERSION is 8
Skipping operation [install], using core tester instead...

Operation [run tests]...
export TERM=linux && cd /var/www && php ./core/scripts/run-tests.sh --php /usr/bin/php --url 'http://localhost' --color --concurrency 4  --xml '/var/workspace/results' --sqlite /var/www/test.sqlite --dburl mysql://drupaltestbot:[email protected]/build_2014_09_20_120520 --keep-results rest,image,simpletest | tee /var/www/test.stdout

Drupal test run
---------------

Tests to be run:
  - Drupal\rest\Tests\AuthTest
  - Drupal\rest\Tests\CreateTest
  - Drupal\rest\Tests\CsrfTest
  - Drupal\rest\Tests\DeleteTest
  - Drupal\rest\Tests\NodeTest
  - Drupal\rest\Tests\ReadTest
  - Drupal\rest\Tests\ResourceTest
  - Drupal\rest\Tests\UpdateTest
  - Drupal\rest\Tests\Views\StyleSerializerTest
  - Drupal\image\Tests\FileMoveTest
  - Drupal\image\Tests\ImageAdminStylesTest
  - Drupal\image\Tests\ImageDimensionsTest
  - Drupal\image\Tests\ImageEffectsTest
  - Drupal\image\Tests\ImageFieldDefaultImagesTest
  - Drupal\image\Tests\ImageFieldDisplayTest
  - Drupal\image\Tests\ImageFieldValidateTest
  - Drupal\image\Tests\ImageItemTest
  - Drupal\image\Tests\ImageStyleFlushTest
  - Drupal\image\Tests\ImageStylesPathAndUrlTest
  - Drupal\image\Tests\ImageThemeFunctionTest
  - Drupal\simpletest\Tests\BrokenSetUpTest
  - Drupal\simpletest\Tests\BrowserTest
  - Drupal\simpletest\Tests\FolderTest
  - Drupal\simpletest\Tests\InstallationProfileModuleTestsTest
  - Drupal\simpletest\Tests\KernelTestBaseTest
  - Drupal\simpletest\Tests\MailCaptureTest
  - Drupal\simpletest\Tests\MissingCheckedRequirementsTest
  - Drupal\simpletest\Tests\OtherInstallationProfileTestsTest
  - Drupal\simpletest\Tests\SimpleTestBrowserTest
  - Drupal\simpletest\Tests\SimpleTestTest
  - Drupal\simpletest\Tests\UserHelpersTest

Test run started:
  Saturday, September 20, 2014 - 12:05

Test summary
------------

Drupal\rest\Tests\AuthTest                                    17 passes                                      
Drupal\rest\Tests\DeleteTest                                  64 passes                                      
Drupal\rest\Tests\CreateTest                                  87 passes                                      
Drupal\rest\Tests\CsrfTest                                    30 passes                                      
Drupal\rest\Tests\NodeTest                                    34 passes                                      
Drupal\rest\Tests\ResourceTest                                 8 passes                                      
Drupal\rest\Tests\UpdateTest                                  61 passes                                      
Drupal\rest\Tests\ReadTest                                    79 passes                                      
Drupal\image\Tests\FileMoveTest                                4 passes                                      
Drupal\image\Tests\ImageDimensionsTest                        32 passes  24 fails  31 exceptions             
Drupal\image\Tests\ImageFieldDefaultImagesTest                66 passes                                      
Drupal\image\Tests\ImageEffectsTest                           48 passes                                      
Drupal\image\Tests\ImageFieldValidateTest                     38 passes                                      
Drupal\image\Tests\ImageItemTest                              22 passes                                      
Drupal\image\Tests\ImageAdminStylesTest                      268 passes             2 exceptions             
Drupal\image\Tests\ImageFieldDisplayTest                     191 passes                                      
Drupal\image\Tests\ImageStyleFlushTest                        41 passes                                      
Drupal\rest\Tests\Views\StyleSerializerTest                  103 passes  14 fails   1 exceptions             
Drupal\simpletest\Tests\BrowserTest                           18 passes                                      
Drupal\image\Tests\ImageThemeFunctionTest                     19 passes                                      
Drupal\simpletest\Tests\FolderTest                             2 passes                                      
Drupal\simpletest\Tests\BrokenSetUpTest                       44 passes   1 fails   1 exceptions             
Drupal\simpletest\Tests\MailCaptureTest                       13 passes                                      
Drupal\simpletest\Tests\InstallationProfileModuleTestsTest    11 passes   2 fails   1 exceptions             
Drupal\simpletest\Tests\KernelTestBaseTest                    90 passes                                      
Drupal\simpletest\Tests\MissingCheckedRequirementsTest        12 passes   1 fails   1 exceptions             
Drupal\simpletest\Tests\OtherInstallationProfileTestsTest     10 passes   2 fails                            
Drupal\simpletest\Tests\UserHelpersTest                       46 passes                                      
Drupal\image\Tests\ImageStylesPathAndUrlTest                 201 passes                                      
Drupal\simpletest\Tests\SimpleTestTest                        33 passes  15 fails  23 exceptions             
Drupal\simpletest\Tests\SimpleTestBrowserTest                 85 passes   4 fails                            

Test run duration: 3 min 43 sec


Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941
real 224.57
user 0.01
sys 0.01

@ricardoamaro
Copy link
Owner

And that is line 941.
explode() is exploding:

      // Create the XML element for this test case:
      $case = $dom_document->createElement('testcase');
      $case->setAttribute('classname', $test_class);
>>>>> list($class, $name) = explode('->', $result->function, 2);
      $case->setAttribute('name', $name);

      // Passes get no further attention, but failures and exceptions get to add more detail:
      if ($result->status == 'fail') {
        $fail = $dom_document->createElement('failure');
        $fail->setAttribute('type', 'failure');
        $fail->setAttribute('message', $result->message_group);
        $text = $dom_document->createTextNode($result->message);
        $fail->appendChild($text);
        $case->appendChild($fail);

@wimleers wimleers changed the title PHP 5.5 + Drupal 8.0.x: failed tests + fatal error at the end prevents writing the report! PHP 5.4|5.5 + Drupal 8.0.x: failed tests + fatal error at the end prevents writing the report! Sep 23, 2014
@wimleers wimleers changed the title PHP 5.4|5.5 + Drupal 8.0.x: failed tests + fatal error at the end prevents writing the report! PHP 5.5 + Drupal 8.0.x: failed tests + fatal error at the end prevents writing the report! Sep 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants