Integrated: 8301701 : java/net/DatagramSocket/DatagramSocketMulticasting.java should be hardened

Darragh Clarke duke at openjdk.org
Tue Feb 28 06:55:15 UTC 2023


On Fri, 10 Feb 2023 15:43:35 GMT, Darragh Clarke <duke at openjdk.org> wrote:

> Updated `DatagramSocketMulticasting` to use Junit and also hardened the test to avoid occasional interference from other tests.
> 
> - Test now uses Junit Assertions, in general if the assertion used had been `assertTrue(foo==bar)` I replaced it with `assertEquals(foo,bar)` though there are some cases where I used `assertTrue` or `assertFalse`
> - `testSendReceive` now retries up to 3 times if a message from an unexpected port is received
> - Both `testSendReceive` and `testSendNoReceive` both have messages that use the methods name instead of just "hello"
> 
> Ran tiers 1-3 of tests as well as running this updated test to make sure it was stable

This pull request has now been integrated.

Changeset: 5feb13b5
Author:    Darragh Clarke <Darragh.clarke at oracle.com>
Committer: Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/5feb13b55d32fad8f533f52ee7bd63e2cf2d247c
Stats:     67 lines in 1 file changed: 22 ins; 20 del; 25 mod

8301701: java/net/DatagramSocket/DatagramSocketMulticasting.java should be hardened

Reviewed-by: dfuchs

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

PR: https://git.openjdk.org/jdk/pull/12513


More information about the net-dev mailing list