Skip to content

chore: Improve phpunit performance - #63300

Merged
SystemKeeper merged 10 commits into
masterfrom
chore/noid/improve-phpunit-performance
Aug 18, 2026
Merged

chore: Improve phpunit performance#63300
SystemKeeper merged 10 commits into
masterfrom
chore/noid/improve-phpunit-performance

Conversation

@SystemKeeper

@SystemKeeper SystemKeeper commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Updates PHPUnit to 11.5.56 (was still at 11.5.50 and one of the features is not available there)
  • Fixes issues with overwriting system configs and not properly resetting them
  • Ensures that the appstore test does not actually make an request
  • Removes a leftover user from ApiV1ControllerTest
  • Logs the slowest test to CI summary for further inspection
  • Sets hashing values in preseed-config.php to improve performance on CI

PHPUnit 32bit seem unrelated, since they also happen on master: https://github.com/nextcloud/server/actions/runs/31857387353/job/94944615074 ?

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@SystemKeeper
SystemKeeper force-pushed the chore/noid/improve-phpunit-performance branch 3 times, most recently from 6462bf3 to 9467b99 Compare August 16, 2026 17:12
@SystemKeeper SystemKeeper added this to the Nextcloud 35 milestone Aug 16, 2026
@SystemKeeper SystemKeeper added 3. to review Waiting for reviews php Pull requests that update Php code performance 🚀 tests Related to tests labels Aug 16, 2026
@SystemKeeper SystemKeeper changed the title Chore/noid/improve phpunit performance chore: Improve phpunit performance Aug 16, 2026
@SystemKeeper
SystemKeeper marked this pull request as ready for review August 16, 2026 17:34
@SystemKeeper
SystemKeeper requested a review from a team as a code owner August 16, 2026 17:34
@SystemKeeper
SystemKeeper requested review from Altahrim, CarlSchwan, come-nc and salmart-dev and removed request for a team August 16, 2026 17:34
@SystemKeeper SystemKeeper self-assigned this Aug 17, 2026
@SystemKeeper
SystemKeeper force-pushed the chore/noid/improve-phpunit-performance branch from 9467b99 to 48bd626 Compare August 18, 2026 09:00
Comment thread tests/junit-analyzer.php Outdated
Comment thread tests/junit-analyzer.php Outdated
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Comment thread tests/junit-analyzer.php
@come-nc

come-nc commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Looks good apart from my feedback on the script.
Would it be possible to detect/block all outgoing HTTP requests from tests?

@come-nc

come-nc commented Aug 18, 2026

Copy link
Copy Markdown
Contributor
Top 30 slowest classes (sum of its tests)
        sum   tests   mean(ms)  class
     55.93s      57     981.28  ApiV1ControllerTest
     49.13s      57     861.90  CommandTest
     30.01s      10    3000.91  OCA\Encryption\Tests\Command\FixEncryptedVersionTest

Any idea why the first two here are listed without namespace?

@come-nc

come-nc commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Any idea why the first two here are listed without namespace?

Namespace is actually missing from the file -_-

@SystemKeeper

Copy link
Copy Markdown
Contributor Author

Would it be possible to detect/block all outgoing HTTP requests from tests?

Good question, that would actually be interesting 🤔

@nextcloud-bot nextcloud-bot mentioned this pull request Aug 18, 2026
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper
SystemKeeper force-pushed the chore/noid/improve-phpunit-performance branch from 48bd626 to 16b9e9f Compare August 18, 2026 10:40
Comment thread tests/lib/HttpRequestLogger.php Outdated
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper
SystemKeeper force-pushed the chore/noid/improve-phpunit-performance branch from 16b9e9f to c35a6f4 Compare August 18, 2026 10:58
@SystemKeeper
SystemKeeper enabled auto-merge August 18, 2026 14:10
@SystemKeeper
SystemKeeper merged commit f255146 into master Aug 18, 2026
269 of 277 checks passed
@SystemKeeper
SystemKeeper deleted the chore/noid/improve-phpunit-performance branch August 18, 2026 15:24
@SystemKeeper

Copy link
Copy Markdown
Contributor Author

/backport to stable34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted performance 🚀 php Pull requests that update Php code tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants