core
core copied to clipboard
Flaky acceptance tests because suite expects an ordered list of shares
The acceptance test suite expects the list of shares returned by the ocs API to be ordered, which is currently not guaranteed (see https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/Sharing.php#L2037).
The cs3 share manager for examples uses uuids as share ids and sorts the returned list by those (I believe) which causes flaky tests as seen in https://drone.owncloud.com/owncloud/ocis/12005.
Note: The list of received shares is also not guaranteed to be sorted by creation date, just like the list of owned shares. I'm not sure if that needs to be adjusted in the test suite as well.
Thinking... - might need to refactor a bit to remember "the last share" at an earlier point in the test code.
Example PR with this problem: https://github.com/owncloud/ocis/pull/3697
This should be improved (or fixed) by https://github.com/owncloud/core/pull/40114
The refactored API test code is running in: oCIS https://github.com/owncloud/ocis/pull/3908 reva edge https://github.com/cs3org/reva/pull/2915 reva master https://github.com/cs3org/reva/pull/2914
I will deal with the 2 new test fails in reva (issue https://github.com/cs3org/reva/issues/2916 ) separately. I don't think that they impact the test code in any significant way.
Please ping me if any problems are found, and close when you think this is working well.
I added some comments to issue https://github.com/cs3org/reva/issues/2916
The test code changes seem to be fine. I will close this issue.