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

test: avoid conflict access to tempfile on windows #3268

Merged
merged 1 commit into from Mar 1, 2021

Conversation

kenhys
Copy link
Contributor

@kenhys kenhys commented Feb 25, 2021

Which issue(s) this PR fixes:

N/A

What this PR does / why we need it:

It is a straight forward enough approach to use File.stat for these
test cases.

In test case, setup creates a temporary file and each test case try to access
via Fluent::Filewrapper.stat but it causes INVALID_HANDLE_VALUE.

Docs Changes:

N/A

Release Note:

N/A

It is straight forward enough to use File.stat for these
test cases.

Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
@kenhys
Copy link
Contributor Author

kenhys commented Feb 25, 2021

On windows, it will pass.

> ruby -Ilib .\test\plugin\in_tail\test_position_file.rb
Loaded suite ./test/plugin/in_tail/test_position_file
Started
..............
Finished in 0.0289855 seconds.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
14 tests, 49 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
483.00 tests/s, 1690.50 assertions/s

@cosmo0920
Copy link
Contributor

cosmo0920 commented Mar 1, 2021

I'd confirmed that this patch makes green on position testcases on Windows.
@kenhys How long does it take to ready for review status?

@kenhys kenhys marked this pull request as ready for review March 1, 2021 03:32
@cosmo0920 cosmo0920 merged commit 65a9edf into fluent:master Mar 1, 2021
@kenhys kenhys deleted the fix-position-test branch March 8, 2021 02:43
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