Skip to content

test: avoid conflict access to tempfile on windows#3268

Merged
cosmo0920 merged 1 commit into
fluent:masterfrom
kenhys:fix-position-test
Mar 1, 2021
Merged

test: avoid conflict access to tempfile on windows#3268
cosmo0920 merged 1 commit into
fluent:masterfrom
kenhys:fix-position-test

Conversation

@kenhys

@kenhys kenhys commented Feb 25, 2021

Copy link
Copy Markdown
Contributor

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

kenhys commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

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

cosmo0920 commented Mar 1, 2021

Copy link
Copy Markdown
Contributor

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.

2 participants