RFR: 8273507: Convert test/jdk/java/nio/channels/Channels/TransferTo.java to TestNG test [v4]

Brian Burkhalter bpb at openjdk.java.net
Wed Sep 29 22:38:31 UTC 2021


On Sun, 26 Sep 2021 13:44:31 GMT, Markus KARG <github.com+1701815+mkarg at openjdk.org> wrote:

>> Using TestNG makes it easier to maintain and extend the unit test of ChannelInputStream::transferTo.
>> 
>> This change was proposed by Brian Burkhalter @blbp and requested Alan Bateman @AlanBateman.
>> 
>> *Note: A further test addition (testing 2GB+ transfers) will be added by me in a subsequent PR using TestNG once *this* PR is merged. This will need a while due to personal scheduling, also the topics are not necessarily related, hence there are separate PRs.*
>
> Markus KARG has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Comment for checkTransferredContents
>   
>   Signed-off-by: Markus Karg <markus at headcrashing.eu>

The comments are much improved but inconsistent. For example some of them have `@param` and other javadoc tags and some do not. There is also some variation in detail level.

On a process level, it would be better to wait for feedback on changes before integrating. This is especially so as a sponsor has to be comfortable with the content. Ideally at least one approval should be associated with the most recent commit.

test/jdk/java/nio/channels/Channels/TransferTo.java line 28:

> 26: import static org.testng.Assert.assertEquals;
> 27: import static org.testng.Assert.assertThrows;
> 28: import static org.testng.Assert.assertTrue;

Static imports in tests are usually grouped by convention after regular imports.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5421


More information about the nio-dev mailing list