Research using dblog at tests

Created on 26 December 2024, about 2 months ago

Problem/Motivation

It looks like there are several tests at core that really don't need dblog module.

Steps to reproduce

Proposed resolution

Remove dblog module if it's not necessary.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

phpunit

Created by

πŸ‡·πŸ‡ΊRussia zniki.ru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @zniki.ru
  • Pipeline finished with Failed
    about 2 months ago
    Total: 555s
    #379196
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1757s
    #379206
  • πŸ‡·πŸ‡ΊRussia zniki.ru

    Tests passed. Need to double check unnecesate usage of dblog were found before moving to NR.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    I made review of dblog module usage in code base, here is a little summary:

    For these Kernel tests we can replace dblog module with \Symfony\Component\ErrorHandler\BufferingLogger, or use approach similar to 59ce5ede.

    • Drupal\Tests\comment\Kernel\CommentIntegrationTest
    • Drupal\Tests\field_ui\Kernel\EntityDisplayTest
    • Drupal\Tests\image\Kernel\ImageItemTest
    • Drupal\Tests\jsonapi\Kernel\ResourceType\RelatedResourseTypeTest
    • !Drupal\KernelTests\Core\Action\EmailActionTest

    These functional tests maybe we can also make replacement, but this need to be discused.

    • ?Drupal\Tests\big_pipe\Functional\BigPipeTest
    • ?Drupal\Tests\media\FunctionalJavascript\MediaSourceOEmbedVideoTest
    • ?Drupal\Tests\node\FunctionalNodeCreationTest
    • ?Drupal\Tests\system\Functional\Module\ModuleTestBase

    These is not obvious, but need dblog module:

    • Drupal\Tests\system\Functional\UpdateSystem\UpdateScriptTest can't be removed "$this->assertSession()->linkExists('logged');"
    • Drupal\Tests\views\Kernel\Handler\HandlerAllTest test view handler for watchdog table.

    I believe these changes need to be done is separate issue, I will create follow-up.

    This issue is ready for review.

  • πŸ‡·πŸ‡ΊRussia zniki.ru

    There is an issue with solving this ✨ Allow kernel tests to fail or expect logged errors Needs work .

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Why don't we do the kernel tests here and maybe push the functional to a follow up, since that may need some trial and error.

Production build 0.71.5 2024