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

Silence retried to delete file messages #30974

Merged
merged 1 commit into from
Apr 3, 2018
Merged

Conversation

phil-davis
Copy link
Contributor

Description

If the scenario step does not expect the file to be able to be deleted, then do not emit messages about "retried to delete". In this case we know that we are supposed to retry a bit, and then it is expected that we will give up and not be able to delete the file.

In this case, reduce the number of retries so we do not waste so much time rechecking that a delete really cannot be done.

Related Issue

#30897
This "cleanup" is to reduce "noise" in the test output, so that people do not mis-understand what is "normal" and what is a problem.

Motivation and Context

When a test tries to delete a file, and expects that it should not be possible to delete the file, then actually the "Delete" action does not exist in the file actions menu. That is expected and what is being tested for. But while doing the checks, the code emits messages like:

INFORMATION: retried to delete file
Error while deleting file

These are disturbing to read in the test output, and can send you off looking for problems in the wrong place, when actually this is expected to happen for these test scenario steps.

When we are doing this kind of "negative" "cannot delete" test, we should not emit this noise.

How Has This Been Tested?

Run a full set of webUI tests on Travis. Inspect the logs and see that these INFORMATION: messages no longer appear.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Acceptance test refactoring

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@phil-davis
Copy link
Contributor Author

Backport stable10 #30975

@codecov
Copy link

codecov bot commented Apr 2, 2018

Codecov Report

Merging #30974 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #30974   +/-   ##
=========================================
  Coverage      62.3%    62.3%           
  Complexity    18208    18208           
=========================================
  Files          1142     1142           
  Lines         68176    68176           
  Branches       1232     1232           
=========================================
  Hits          42480    42480           
  Misses        25335    25335           
  Partials        361      361
Flag Coverage Δ Complexity Δ
#javascript 52.04% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.47% <ø> (ø) 18208 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6be432...8d4a1c1. Read the comment docs.

@@ -272,7 +272,7 @@ public function openFile($name, Session $session) {
*
* @return void
*/
public function deleteFile($name, Session $session, $maxRetries = STANDARDRETRYCOUNT) {
public function deleteFile($name, Session $session, $expectToDeleteFile = true, $maxRetries = STANDARDRETRYCOUNT) {
Copy link
Member

Choose a reason for hiding this comment

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

long line makes it harder to review in GitHub

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reformat pushed

@phil-davis phil-davis force-pushed the silence-retried-to-delete branch from a44c44a to 7656c98 Compare April 3, 2018 04:28
@phil-davis phil-davis force-pushed the silence-retried-to-delete branch from 7656c98 to 8d4a1c1 Compare April 3, 2018 08:29
@phil-davis phil-davis merged commit 3c3fa34 into master Apr 3, 2018
@phil-davis phil-davis deleted the silence-retried-to-delete branch April 3, 2018 09:59
@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants