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

[BUG] Fix remaining failing unit tests on Windows #970

Closed
graytaylor0 opened this issue Feb 1, 2022 · 2 comments
Closed

[BUG] Fix remaining failing unit tests on Windows #970

graytaylor0 opened this issue Feb 1, 2022 · 2 comments
Labels
backlog bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@graytaylor0
Copy link
Member

Describe the bug
Some unit tests are not compatible with Windows, and causes the overall build to fail

To Reproduce
Steps to reproduce the behavior:
Run ./gradlew build for Data Prepper on a Windows computer

Expected behavior
The build should succeed.

Environment (please complete the following information):

  • OS: Windows
  • Version 10

Additional context
Some of the failed tests were fixed in this PR #968

@jzonthemtn
Copy link
Contributor

Hi! I looked into this and I think the underlying issue is how Path handles a path with a leading slash that Windows gives, e.g. /C:/some/directory. This causes the InvalidPathException that shows up in the unit tests on Windows:

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/some/directory

File is able to handle the "system-dependent prefix string" (javadoc) and so changing from Path.of() to File.toPath() lets it work on Windows and non-Windows.

I tested the build on Windows 11 and Ubuntu 20.04. Please take a look at the PR and let me know if there's any issues!

dlvenable pushed a commit that referenced this issue Jun 8, 2022
@dlvenable dlvenable added this to the v1.5 milestone Jun 9, 2022
@dlvenable
Copy link
Member

Thanks @jzonthemtn for resolving the Windows build issues.

finnroblin pushed a commit to finnroblin/data-prepper that referenced this issue Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants