RFR: 8355445: [java.nio] Use @requires tag instead of exiting based on "os.name" property value
Jaikiran Pai
jpai at openjdk.org
Fri Apr 25 06:47:44 UTC 2025
On Thu, 24 Apr 2025 20:48:58 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Use the `@requires` tag instead of obtaining the operating system name from the `os.name` property and then exiting if the test is not run on that operating system.
test/jdk/java/nio/file/Files/StreamTest.java line 30:
> 28: * @run testng StreamTest
> 29: * @summary Unit test for java.nio.file.Files methods that return a Stream
> 30: * @requires (os.family == "linux")
Hello Brian, the changes to the rest of the tests in this PR look good to me. I think the change to this test is an oversight. This test class has several test methods and it's only the `testProcFile()` which requires to be run on Linux. Adding this `@requires` would mean that we will now skip running the rest of these test methods on other operating systems.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24861#discussion_r2059654478
More information about the nio-dev
mailing list