Tests slow since 4.2.1 #17290
Labels
c: Tests & QA
For issues related to automated tests or making it easier to QA & test issues.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
Regression
Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone
The tests are slow since 4.2.1 release. For example some tests in Matomo for WordPress the performance got worse from 1s per test to 20s. Also various developers reported slow tests.
The reason is https://github.com/matomo-org/matomo/pull/17225/files which is executed on every update.
In particular https://github.com/matomo-org/matomo/blob/4.2.1/plugins/Installation/ServerFilesGenerator.php#L310 is the problem.
I wonder if we could remove this call to
deleteHtAccessFiles ()
and if we ever remove an.htaccess
file that we no longer need instead rather have a specific update script for it? Maybe this way it be even better like what if deletion of htaccess works but maybe for some reasons the writing of htaccess files fails or because of a bug it is not rewritten? Also technically it means there's for a very short time no .htaccess file.Alternatively, another way to fix it could be to check for a
PIWIK_TEST_MODE
constant and not execute it during tests but ideally we're always having it the same way.The text was updated successfully, but these errors were encountered: