Skip to content

test(cache): avoid ordering assumptions in testExtended#60881

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-fix-cache-ordering-assumption
Open

test(cache): avoid ordering assumptions in testExtended#60881
joshtrichards wants to merge 1 commit into
masterfrom
jtr/test-fix-cache-ordering-assumption

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

@joshtrichards joshtrichards commented May 30, 2026

  • Resolves: #

Summary

This test is flaky because it assumes getFolderContents() returns entries in a fixed order, and sometimes it doesn’t.

AFAIK getFolderContents() does not promise insertion order or alphabetical order.

This updates testExtended() to avoid relying on ordering.

Addresses test failures such as this:

There was 1 failure:

1) Test\Files\Cache\Wrapper\CachePermissionsMaskTest::testExtended
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'foo1'
+'foo4'

/home/runner/actions-runner/_work/server/server/tests/lib/Files/Cache/CacheTest.php:804

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
Copy link
Copy Markdown
Member Author

/backport to stable34

@joshtrichards
Copy link
Copy Markdown
Member Author

/backport to stable33

@joshtrichards joshtrichards added this to the Nextcloud 35 milestone May 30, 2026
@joshtrichards joshtrichards requested a review from miaulalala May 30, 2026 17:11
@joshtrichards joshtrichards marked this pull request as ready for review May 30, 2026 17:12
@joshtrichards joshtrichards requested a review from a team as a code owner May 30, 2026 17:12
@joshtrichards joshtrichards requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team May 30, 2026 17:12
@joshtrichards joshtrichards added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant