[tests-only][full-ci]Refactor code for upload nightly fail #7532
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.
Description
This PR might fix this issue #7369 since this issue is continuously failing on nightly. That issue cannot be reproduce locally but fails consistently on CI. I have debugged the scenario in CI and the refactor seems to be more consistent.
Before refactor : DEBUG CI Build
Out of 500+ scenarios it failed 183+ times
https://drone.owncloud.com/owncloud/web/27819/10/21
After reactor : DEBUG CI Build
All passed Consistently (500+ scenarios)
https://drone.owncloud.com/owncloud/web/27852
Note: For more info refer above issue.