Speed up WorkspacesContentModerationStateTest

Created on 19 August 2024, 3 months ago
Updated 5 September 2024, 3 months ago

Problem/Motivation

Although this is a kernel test it runs 40 tests methods, 5 of which skip after doing a fair bit of setup.

Steps to reproduce

(numbers from my local dev environment)

Before:

Time: 01:00.910, Memory: 6.00 MB

OK, but some tests were skipped!
Tests: 40, Assertions: 2835, Skipped: 5.

After:

Time: 00:55.201, Memory: 6.00 MB

OK, but some tests were skipped!
Tests: 43, Assertions: 2500, Skipped: 8.

There are three more tests skipped and you would expect because of the way that data providers work, confirmed it's the same five methods getting skipped, just we mark one skipped three times instead of once this way.

On gitlab:
Before:

Drupal\Tests\content_moderation\Kernel\WorkspacesContentMode  40 passes  133s 

After:

Drupal\Tests\content_moderation\Kernel\WorkspacesContentMode  43 passes  122s

This isn't saving lots of time, but it's saving a few seconds from what is a very long test for a kernel test (on slower pods it can take a fair bit longer than 130s).

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
WorkspacesΒ  β†’

Last updated 4 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024