Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

test(files): make SearchBuilderTest independent of shared filecache state - #59484

Closed
joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-SearchBuilderTest-flaky-fix
Closed

joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-SearchBuilderTest-flaky-fix

Conversation

@joshtrichards

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Make SearchBuilderTest less flaky by removing its dependence on a fixed storage id in filecache.

Changes

  • use a unique numericStorageId per test run instead of 10000
  • defensively clean matching filecache rows in setUp()
  • fix addCacheEntry() so storage_mtime is assigned after defaulting mtime

Why

This DB test currently inserts/searches rows in filecache using a hard-coded storage = 10000 and only cleans up in tearDown(). If stale rows exist for that storage, the assertions can pick up unrelated fileids and fail nondeterministically in CI.

Using a unique storage id makes the test self-isolating, and the storage_mtime change fixes a small helper bug where mtime could be read before default initialization.

TODO

  • ...

Checklist

AI (if applicable)

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

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added bug tests Related to tests labels Apr 7, 2026
@susnux susnux added the community pull requests from community label Jun 9, 2026
@susnux susnux added this to the Nextcloud 35 milestone Jun 9, 2026
@blizzz blizzz mentioned this pull request Aug 27, 2026
@susnux

susnux commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request as it has been in draft state without any activity for more than six months.
If you are still interested in this change, feel free to revive it and reopen it (or ask us to reopen it if you cannot).
Thank you for your contribution!

@susnux susnux closed this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug community pull requests from community tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants