Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
phpunit
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2023 at 08:57 UTC
Updated:
24 Nov 2023 at 10:49 UTC
Jump to comment: Most recent
The SQLite tests in D7 GitlabCI are green, but if we examine them closely, they are never run at all, because there are errors (probably caused by the image used in _TARGET_DB) - https://git.drupalcode.org/project/drupal/-/jobs/234413:
$ sudo service apache2 start
Starting Apache httpd web server: apache2(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
$ sudo -u www-data php ./scripts/run-tests.sh --color --concurrency "$CONCURRENCY" --url "$SIMPLETEST_BASE_URL" --verbose --fail-only --all --xml "$CI_PROJECT_DIR/sites/default/files/simpletest" --ci-parallel-node-index $CI_PARALLEL_NODE_INDEX --ci-parallel-node-total $CI_PARALLEL_NODE_TOTAL
PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in lock_may_be_available() (line 167 of /builds/project/drupal/includes/lock.inc).
See: https://git.drupalcode.org/project/drupal/-/jobs/234413
Try to update the _TARGET_DB to "sqlite-3" to match D10 to see if this will be sufficient, or if any other changes will be needed regarding the second error.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
fjgarlin commentedAfter several attempts, it seems that the problem is permissions related. Running the site install as user "www-data" seems to fix the issue.
I'll continue working on it next week, clean up the MR and see if we can capture that exception early on.
Comment #5
fjgarlin commentedThis is now ready to review.
Changes:
Full pipeline running here: https://git.drupalcode.org/issue/drupal-3397117/-/pipelines/40161
And sqlite jobs can be seen running here: https://git.drupalcode.org/issue/drupal-3397117/-/jobs/236784
Comment #6
poker10 commentedThanks for working on this!
I think the changes in
pipeline.ymland.gitlab-ci.ymllooks good and are in line with the D10 code.The change in
drupal_web_test_case.phpis indeed a good catch, but I am not sure if we should fix that here, as it does not seems to be 100% related to the SQLite issue (AFAICS SQLite seems to run again also when this try-catch fix was not added). I found this issue now: #2763435: Exceptions during the setUp() or tearDown() method of a test are not handled, so I think we should split the fix here to just include the fixes topipeline.ymland.gitlab-ci.ymland move the try-catch fix to the mentioned issue, so we do not get things mixed up.Comment #7
fjgarlin commentedThanks for the feedback. I took out the changes from
drupal_web_test_case.phpand moved them to #2763435: Exceptions during the setUp() or tearDown() method of a test are not handled, where there is now an MR ready to review.The changes for this issue and this MR are ready too. Only
pipeline.ymland.gitlab-ci.ymlare changed now and all GitLab CI tests run as expected now.Comment #8
fjgarlin commentedComment #9
bramdriesenMR looks straight forward enough and the fact the tests have been run successfully and are all green makes me think we can RTBC this and merge it! 🙂
Comment #11
poker10 commentedCommitted, thanks everyone!