RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup" [v9]

Darragh Clarke duke at openjdk.org
Tue Nov 8 16:01:20 UTC 2022


On Tue, 8 Nov 2022 14:51:15 GMT, Darragh Clarke <duke at openjdk.org> wrote:

>> test/jdk/java/nio/channels/DatagramChannel/SelectWhenRefused.java line 38:
>> 
>>> 36: import java.util.Set;
>>> 37: 
>>> 38: import static jdk.test.lib.Asserts.assertNotEquals;
>> 
>> Ah! Darn. I wonder if we should convert the test to testng or junit instead, just for the purpose of using junit/testng assertions. It would avoid the need of linking to /test/lib too. Just some idle thought.
>> The other day Pavel and I were wondering if that Asserts class should be retired - given that we have them available in testng/junit now...
>
> I wouldn't be against changing it, At a glance using Junit is only around 10 lines of changes, though I'm not sure if theres any additional patterns I should follow in swapping it to junit beyond using `@Test` instead of a main method? (and of course changing imports and `@run`)

I made the change there and made sure the test was still working as intended

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

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


More information about the nio-dev mailing list