RFR: 8318662: Refactor some jdk/java/net/httpclient/http2 tests to JUnit [v2]
Mahendra Chhipa
mchhipa at openjdk.org
Tue Sep 23 16:48:24 UTC 2025
On Mon, 22 Sep 2025 14:40:19 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Implemented the review comments.
>
> test/jdk/java/net/httpclient/http2/ConnectionFlowControlTest.java line 75:
>
>> 73: import org.junit.jupiter.params.provider.MethodSource;
>> 74:
>> 75: import static org.junit.jupiter.api.Assertions.*;
>
> This test uses `assertEquals` and `assertNotEquals`. Unless I'm mistaken, the parameters order are reversed in JUnit compared to TestNG. That is, one has (expected, actual), the other has (actual, expected). Unless there was already a mistake in the original code, you should also reverse the parameters order at the call sites of `assertEquals`/`assertNotEquals`. Otherwise, the text message of any `AssertionError` thrown by these will be confusing.
Thanks. Now corrected with expected and actul values.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27388#discussion_r2372914172
More information about the net-dev
mailing list