Repository navigation
test: Ignore background jobs in recents counts - #5300
Merged
Merged
Conversation
The recents tests compare the number of CouchDB requests of two calls to `GET /files/recents`. The counter wrapped the shared CouchDB client, so it also counted the requests of the jobs run in the background by the triggers on the files: the thumbnail jobs of the images without content, which fail and retry, and the instance lookups of the antivirus trigger. One of them landing during a call made the test fail once in a while. The counters now keep only the requests to the databases of the instances under test, without the jobs database. Co-Authored-By: AI
The drives test of the recents still failed once in a while: the count of a call to `GET /files/recents` got one more request on the databases of the owner. The thumbnail jobs of the images of the owner read the parent folder of their file to open it, and they fail then retry while the test runs, because the images have no content. The count now starts once the owner has no thumbnail job queued or running. Co-Authored-By: AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestRecentsListCompletesTheDriveItemsfailed once on #5251 (expected11 CouchDB requests, got 12):
https://github.com/linagora/cozy-stack/actions/runs/43977901272/job/133686519208
The counter wrapped the shared CouchDB client, so it also counted the
requests of the jobs run in the background by the triggers on the
files: the thumbnail jobs of the test images, which have no content
and fail then retry, and the instance lookups of the antivirus
trigger. The counters of the recents tests now keep only the requests
to the databases of the instances under test, without the jobs
database.
A thumbnail job also reads the parent folder of its image to open it,
in the databases of the owner. The count of the drives test now starts
once the owner has no thumbnail job queued or running.