nextcloud / nextcloud/server

tests/unit/CalDAV/CalDavBackendTest.php:1278 is flacky

Open
#37,321 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop feature: caldav feature: dav papercut technical debt tests
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

One issue reported with Postgres and CalDAV resulting in different payload. Related?

No, the used API does not sort and just assumes results are sorted by ID.

So flaky by design and we should fix it (in another PR) by:

  • Sorting the data before returning
  • Sorting the result in the test
  • Compare in a way that sort order does not matter

Originally posted by @nickvergessen in https://github.com/nextcloud/server/issues/37306#issuecomment-1477430743

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/unit/CalDAV/CalDavBackendTest.php at line 1278 and inspect the CalDAV result comparison. Run the test with PostgreSQL to reproduce the differing payload, then make the test or returned data independent of result order. Done means the test passes consistently regardless of ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, postgresql
Domain
backend, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.