RFR: 8283335 : Add exists and readAttributesIfExists methods to FileSystemProvider [v6]
Alan Bateman
alanb at openjdk.org
Tue Jul 5 11:00:43 UTC 2022
On Tue, 5 Jul 2022 09:54:15 GMT, Lance Andersen <lancea at openjdk.org> wrote:
> Unless you feel this is a must, I would prefer to keep the DataProviders. The benefit I see is the test code does not need to be duplicated per parameter, each test scenario can be run as an individual test so that you do not need extra plumbing to run each test scenario in the unlikely event of a failure.
Okay, but there are a few other things to mention:
One issue is the reset method is called at the end of each test. I think it needs to be at the beginning of the method, moved to a finally block of a try-finally, or maybe @BeforeMethod to reset before each test. The reason is that one test failing will cause the tests that follow to fail too.
The fields aren't constants so looks a bit strange (to me anyway) to be in uppercase. If you rename them then I think the tests would be a bit more readable.
-------------
PR: https://git.openjdk.org/jdk/pull/9249
More information about the core-libs-dev
mailing list