Prevent session garbage collection during functional tests

Created on 22 February 2024, 9 months ago
Updated 10 March 2024, 9 months ago

Problem/Motivation

A stop gap until we can do 📌 Do explicit session garbage collection on cron Needs work , which is non-trivial.

Performance tests currently have to assert on a range of queries.

One reason for the variation is that we rely on probability based session garbage collection, which means approx 1/100 requests run a database query to delete old sessions.

This is the only known random database query, at least outside the cache tag API, so should allow 📌 Log every individual query in performance tests Needs work to go ahead without random test failures, or if there are more, it will help us to find and diagnose them.

Steps to reproduce

Proposed resolution

Either:

1. Prevent session gc (set probability to 0) for all tests, on the basis we won't have any stale sessions to garbage collect anyway before the database is destroyed.

2. Prevent it just for performance tests if it turns out #1 is a bad idea for some reason.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.3

Component
PHPUnit 

Last updated about 8 hours ago

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