RFR: 8273507: Using TestNG for unit testing ChannelInputStream::transferTo [v2]
Markus KARG
github.com+1701815+mkarg at openjdk.java.net
Thu Sep 9 07:11:58 UTC 2021
On Wed, 8 Sep 2021 18:53:06 GMT, Lance Andersen <lancea at openjdk.org> wrote:
> I would add a comment for for each DataProvider/Test to give future maintainers an overview of the intent of the methods
I support the general idea of making things more comprehensible, but I will abstain from adding comments in *this* PR due to three reasons:
* This PR *solely* has the target of technically introducing **TestNG** and I really do not want to mix concerns like technical merits with documental merits.
* The current PR is a blocker in the *critical path* of other, higher prioritized PRs. We should try not to slow it down *unnecessarily*.
* 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.
So in the best sense of KISS, SoC and "release early, release often", it makes sense that I will create an (or mutiple) explicit, subsequent PR(s) for introducing BDD instead of adding code comments in the current (slow and big) PR.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5421
More information about the nio-dev
mailing list