RFR: 8293696: java/nio/channels/DatagramChannel/SelectWhenRefused.java fails with "Unexpected wakeup" [v9]
Daniel Fuchs
dfuchs at openjdk.org
Tue Nov 8 14:17:18 UTC 2022
On Tue, 8 Nov 2022 11:12:32 GMT, Darragh Clarke <duke at openjdk.org> wrote:
>> Added logging to SelectWhenRefused for an intermittent failure caused by unexpected wakeups, this includes trying to receive data if there is any available to identify where it is coming from.
>>
>> I also set the test to run in othervm mode which should reduce the chances of this failure happening in the first place.
>
> Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:
>
> further cleanup
Good work! This is much nicer. Just one small comment and one idle thought...
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...
test/jdk/java/nio/channels/DatagramChannel/SelectWhenRefused.java line 87:
> 85: assertNotEquals(i, MAX_TRIES, "testNoPUEAfterDisconnect: too many retries");
> 86: }
> 87: } catch (BindException e) {
Maybe we should actually log that:
System.out.println("Skipping test: refuser port has been reused: " + e);
-------------
PR: https://git.openjdk.org/jdk/pull/10851
More information about the nio-dev
mailing list