Problem/Motivation

\Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber::logEventInfo logs to the drupal logger and then we need check this via the drupal UI in \Drupal\Tests\package_manager\Build\TemplateProjectTestBase::assertExpectedStageEventsFired . This is very complicated and hard to read.

If we instead logged to just a file it would be much easier to check.

Also it would solve a problem in #3357969: For web server dependent unattended updates run the entire life cycle in a separate process that will not be affected by hosting time limits which is that it is hard to wait for cron updates in detached process to finish. This is issue is major because it blocks that issue

Steps to reproduce

Proposed resolution

  1. Change \Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber::logEventInfo log to a json file that would have sub elements for each event that fired and which stage was associated
  2. Change \Drupal\Tests\package_manager\Build\TemplateProjectTestBase::assertExpectedStageEventsFired assert the contents of the file.

Remaining tasks

After this issue is committed
In #3357969: For web server dependent unattended updates run the entire life cycle in a separate process that will not be affected by hosting time limits change \Drupal\Tests\automatic_updates\Build\CoreUpdateTest::waitForStageToBeDestroyed to wait for expected events to have been fired

User interface changes

API changes

Data model changes

Command icon Show commands

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

tedbow created an issue. See original summary.

phenaproxima made their first commit to this issue’s fork.

phenaproxima’s picture

Title: Change package_manager_test_event_logger\EventSubscriber to log to a file to simply checks » Change package_manager_test_event_logger\EventSubscriber to log to a file to simplify it
phenaproxima’s picture

Title: Change package_manager_test_event_logger\EventSubscriber to log to a file to simplify it » Change package_manager_test_event_logger\EventSubscriber to log to a file to simplify it and code which asserts against it
tedbow’s picture

Assigned: Unassigned » phenaproxima
Status: Active » Needs work
phenaproxima’s picture

Assigned: phenaproxima » tedbow
Status: Needs work » Needs review
tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Looks good if tests pass!

phenaproxima’s picture

Status: Reviewed & tested by the community » Needs review

phenaproxima’s picture

Assigned: tedbow » Unassigned
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.