RFR: 8301701 : java/net/DatagramSocket/DatagramSocketMulticasting.java should be hardened [v4]
Daniel JeliĆski
djelinski at openjdk.org
Tue Feb 21 15:23:27 UTC 2023
On Tue, 21 Feb 2023 15:11:39 GMT, Darragh Clarke <duke at openjdk.org> wrote:
>> It may be that it's the other calls to `assertEquals` that are wrong...
>
> looking at the docs for Junit5 https://junit.org/junit5/docs/5.0.1/api/org/junit/jupiter/api/Assertions.html
>
>
> public static void assertEquals(Object expected,
> Object actual)
>
> Asserts that expected and actual are equal.
>
> If both are null, they are considered equal.
it's the opposite: in testNG actual comes first: https://www.javadoc.io/doc/org.testng/testng/6.8.17/org/testng/Assert.html
also, all uses of assertEquals in this test currently put actual value first; they all need to be fixed.
-------------
PR: https://git.openjdk.org/jdk/pull/12513
More information about the net-dev
mailing list