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

WindowsFile: Add testing for DeletePending #3460

Merged
merged 1 commit into from Jul 16, 2021

Conversation

fujimotos
Copy link
Member

@fujimotos fujimotos commented Jul 16, 2021

Which issue(s) this PR fixes:

Ammend #3457

What this PR does / why we need it:

I think I found a way to add testing for the changeset f61c08c.

  1. Create a test file with FILE_SHARE_DELETE mode.
  2. Call DeleteFile() on that file.
  3. Call WindowsFile.stat() on that file.
  4. Check if ENOENT is raised after step 3.

Confirmed to work fine on GitHub Action:

WindowsFile exceptions:
 test: ERROR_SHARING_VIOLATION raised:        .: (0.001220)
 test: Errno::ENOENT raised:                  .: (0.000633)
 test: Errno::ENOENT raised on DeletePending: .: (0.000717)
 test: nothing raised:                        .: (0.000835)

Docs Changes:

Not required.

Release Note:

Not required.

@fujimotos fujimotos requested a review from ashie July 16, 2021 07:20
I think I found a way to add testing for the changeset f61c08c.

 1. Create a test file with FILE_SHARE_DELETE mode.
 2. Call DeleteFile() on that file.
 3. Call stat() on that file.
 4. Check if ENOENT is raised in step 3.

Confirmed to work fine on GitHub Action:

    WindowsFile exceptions:
     test: ERROR_SHARING_VIOLATION raised:        .: (0.001220)
     test: Errno::ENOENT raised:                  .: (0.000633)
     test: Errno::ENOENT raised on DeletePending: .: (0.000717)
     test: nothing raised:                        .: (0.000835)

Signed-off-by: Fujimoto Seiji <fujimoto@ceptord.net>
@fujimotos fujimotos changed the title WindowsFile: Allow Fluentd to respect DeletePending WindowsFile: Add testing for DeletePending Jul 16, 2021
@ashie
Copy link
Member

ashie commented Jul 16, 2021

I confirmed that delete_pending returns true on this case 👍

@ashie ashie merged commit b0d315b into fluent:master Jul 16, 2021
@fujimotos fujimotos deleted the sf/deletepending-test branch July 16, 2021 08:34
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.

None yet

2 participants