Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only]Fixed flaky test detected in files_classifiers #39548

Closed
wants to merge 1 commit into from

Conversation

Talank
Copy link
Contributor

@Talank Talank commented Dec 3, 2021

Description

after some debugging the test scenario apiSharePublicLink2/copyFromPublicLinkOc10Issue37683.feature:9 that was failing in files_classifiers is turned out to be order dependent. And we can make the test pass by swapping the steps to check content in original and copied file.

Related Issue

How Has This Been Tested?

  • 🤖

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline webUIUpload-chrome-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/33888/150/1

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note:

  1. we added an extra check that "/PARENT/copy1.txt" is definitely no longer a file, after it has been overwritten by a folder. That is an enhancement to the scenario, not directly fixing the flaky behavior. (see comment below - this extra step was not useful)

  2. the order of checking the content of the 2 copies of testfile.txt has been changed. That seems to eliminate the flaky behavior in the files_classifier CI. TBH we are not sure why this really helps. But it will be good to get this scenario "happy".

@phil-davis
Copy link
Contributor

Unrelated fail https://drone.owncloud.com/owncloud/core/33888/150/16
I raised issue #39549 and restarted CI.

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiSharePublicLink2-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/33890/72/1

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiSharePublicLink2-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/33892/72/1

@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/core/33892/72/13

And as "Alice" file "/PARENT/copy1.txt" should not exist
file '/PARENT/copy1.txt' should not exist. But it does exist and is a folder

Actually it is probably best that that step works in that way.
The step before is:

And as "Alice" folder "/PARENT/copy1.txt" should exist

That already checks that the resource is a folder, so we already know that it is not a file.

I will remove that extra test step that does not do anything useful.

@phil-davis phil-davis force-pushed the fix-flaky-files_classifier branch from b5e8604 to b7306da Compare December 5, 2021 14:53
@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline webUIUpload-chrome-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/33897/150/1

@sonarcloud
Copy link

sonarcloud bot commented Dec 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis
Copy link
Contributor

phil-davis commented Dec 10, 2021

This has been cherry-picked into PR #39548

@phil-davis phil-davis closed this Dec 10, 2021
@phil-davis phil-davis deleted the fix-flaky-files_classifier branch December 10, 2021 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants