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

Alan Bateman alanb at openjdk.java.net
Mon Sep 13 09:12:49 UTC 2021


On Fri, 10 Sep 2021 06:26:26 GMT, Markus KARG <github.com+1701815+mkarg at openjdk.org> wrote:

> * I dislike code comments and would instead prefer to turn this source code into **BDD** style, i. e. changing the test name into "shouldDoThisInThatCase" style and introducing "given", "when" and "then" sections inside the tests. As this source code is a copy of two other original files, I will do it for all three files in one shot to keep their inherent relationship.

Ugh, please no. As Lance said, we need the source and tests to be as easy to maintain as possible. In this case it would be helpful to have comments on testStreamContents and checkTransferredContents so that it's very quick for someone to know what the test is trying to when it fails (in this area, most of the effort on tests is spent chasing intermittent test failures).

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

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


More information about the nio-dev mailing list