Problem/Motivation

Right now, we are using --sqlite :memory: to store test results in throwaway CI environments.

In the past, the --sqlite option was necessary to pass data between different sub-processes, but since #3515347: Reduce run-tests.sh complexity in spawning subprocesses all data is available to the master process so it's no longer necessary persisting it, hence we started using :memory: for the SQLite test runner database. Right now, not specifying --sqlite means test results are stored to the installed Drupal database (remnant of simpletest times, when a testing UI was provided for test reporting).

Proposed resolution

Make so that if no --sqlite option is passed, test results are stored in an in-memory alternative implementation of TestRunResultsStorageInterface. This is dropping dependency from SQLite and avoid db roundtrips on behalf of an all-PHP implementation.

Introduce a --results-on-installed-db CLI option, alternative to --sqlite, that can be used to store results in the installed db (which is something that was discouraged time ago, anyway).

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3570465

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

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Postponed
mondrake’s picture

Issue tags: -PHPUnit 11 +PHPUnit 12
mondrake’s picture

Status: Postponed » Active
mondrake’s picture

mondrake’s picture

Status: Active » Needs review

mondrake changed the visibility of the branch 3570465-experiment to hidden.

smustgrave’s picture

Recommended way to test this one?

mondrake’s picture

#10 compare the raw output of the jobs of this MR pipelines to the one of HEAD pipelines. Must be the same.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Okay ran the SQL lite here https://git.drupalcode.org/issue/drupal-3570465/-/pipelines/853108

And appears to be same as main if I’m reading it right.

So assuming it’s good? Will mark so it’s not sitting for 3 months again though

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main, thanks!

This doesn't cherry-pick cleanly to 11.x but not entirely sure it needs to, please re-open for backport if you think it should, but otherwise marking fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed 7d1e0a8e on main
    task: #3570465 run-tests.sh - introduce an in-memory storage to replace...

Status: Fixed » Closed (fixed)

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