Skip to content

test: fix Jetty 12 RuntimeIOException deprecation and Windows POSIX c…#118

Open
Yosefnago wants to merge 1 commit intologzio:masterfrom
Yosefnago:fix-test-environment
Open

test: fix Jetty 12 RuntimeIOException deprecation and Windows POSIX c…#118
Yosefnago wants to merge 1 commit intologzio:masterfrom
Yosefnago:fix-test-environment

Conversation

@Yosefnago
Copy link
Copy Markdown

Description

This PR fixes the local test environment setup to allow running tests on Windows machines, and replaces a deprecated Jetty API.

Previous behavior:

  1. TestEnvironment.createTempDirectory() threw an UnsupportedOperationException on Windows due to hardcoded POSIX file permissions (NTFS does not support them).

  2. MockLogzioBulkListener used org.eclipse.jetty.io.RuntimeIOException which is deprecated for removal in Jetty 12.

New behavior:

  1. Checks if posix is supported by the underlying file system (FileSystems.getDefault().supportedFileAttributeViews()) before applying POSIX attributes. On Windows, it falls back to standard directory creation, while maintaining original behavior on Linux/Unix/CI environments.

  2. Uses the standard java.io.UncheckedIOException instead of the deprecated Jetty class.

What type of PR is this?

(check all applicable)

  • 🍕 Feature
  • [x ] 🐛 Bug Fix
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • [x ] ✅ Test
  • 🤖 Build / CI
  • ⏩ Revert

Added tests?

  • 👍 yes
  • [x ] 🙅 no, because they aren't needed
  • 🙋 no, because I need help from somebody

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.

1 participant