Research using dblog at tests

Created on 26 December 2024, 29 days 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
    29 days ago
    Total: 555s
    #379196
  • Pipeline finished with Failed
    29 days 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 .

Production build 0.71.5 2024