Skip to content

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

Merged
CarlSchwan merged 1 commit into
masterfrom
jtr/test-fix-cache-ordering-assumption
Jun 2, 2026
Merged

test(cache): avoid ordering assumptions in testExtended#60881
CarlSchwan merged 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

@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
@CarlSchwan CarlSchwan enabled auto-merge June 1, 2026 08:18
Signed-off-by: Josh <josh.t.richards@gmail.com>
@miaulalala miaulalala force-pushed the jtr/test-fix-cache-ordering-assumption branch from e777b96 to c7fabc4 Compare June 1, 2026 12:22
@CarlSchwan CarlSchwan merged commit bbbdf47 into master Jun 2, 2026
251 of 280 checks passed
@CarlSchwan CarlSchwan deleted the jtr/test-fix-cache-ordering-assumption branch June 2, 2026 11:56
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.

3 participants