Skip to content

WindowsFile: Add testing for DeletePending#3460

Merged
ashie merged 1 commit into
fluent:masterfrom
fujimotos:sf/deletepending-test
Jul 16, 2021
Merged

WindowsFile: Add testing for DeletePending#3460
ashie merged 1 commit into
fluent:masterfrom
fujimotos:sf/deletepending-test

Conversation

@fujimotos

@fujimotos fujimotos commented Jul 16, 2021

Copy link
Copy Markdown
Contributor

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 force-pushed the sf/deletepending-test branch from a1ebeea to dde8efe Compare July 16, 2021 07:24
@fujimotos fujimotos changed the title WindowsFile: Allow Fluentd to respect DeletePending WindowsFile: Add testing for DeletePending Jul 16, 2021
@ashie

ashie commented Jul 16, 2021

Copy link
Copy Markdown
Member

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.

2 participants