core icon indicating copy to clipboard operation
core copied to clipboard

Flaky acceptance tests because suite expects an ordered list of shares

Open aduffeck opened this issue 2 years ago • 4 comments

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.

aduffeck avatar May 23 '22 06:05 aduffeck

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.

aduffeck avatar May 23 '22 07:05 aduffeck

Thinking... - might need to refactor a bit to remember "the last share" at an earlier point in the test code.

phil-davis avatar May 23 '22 07:05 phil-davis

Example PR with this problem: https://github.com/owncloud/ocis/pull/3697

phil-davis avatar May 23 '22 07:05 phil-davis

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.

phil-davis avatar Jun 03 '22 06:06 phil-davis

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.

phil-davis avatar May 10 '23 08:05 phil-davis