On Tue, 17 Nov 2026 23:37:49 GMT, Erik Gahlin <[email protected]> wrote:
>> Could I have a review of a PR that fixes missing socket events when an >> exception occurs? These events were lost when we changed from bytecode >> instrumentation to static event commits. >> >> I didn't add testing for timeouts because I worry the tests will be flaky or >> slow. >> >> Testing: jdk_net, jdk_nio_networkchannel, test/jdk/jdk/jfr >> >> >> >> Thanks >> Erik >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Erik Gahlin has updated the pull request incrementally with one additional > commit since the last revision: > > Improve testing Verified that tests fail in the absence of the fixes. test/jdk/jdk/jfr/event/io/TestSocketAdapterEvents.java line 50: > 48: /** > 49: * @test > 50: * @bug 8310978 Suggestion: * @bug 8310978 8397189 test/jdk/jdk/jfr/event/io/TestSocketAdapterEvents.java line 113: > 111: } catch (ClosedChannelException cce) { > 112: > addExpectedEvent(IOEvent.createSocketReadEvent(0, s)); > 113: } *Nit:* You can consider shortening these using `assertThrows` from `jdk.test.lib.Asserts`: assertThrows( ClosedChannelException.class, is::read, "Missing ClosedChannelException for is.read()"); addExpectedEvent(IOEvent.createSocketReadEvent(0, s)); test/jdk/jdk/jfr/event/io/TestSocketChannelEvents.java line 47: > 45: > 46: /** > 47: * @test Suggestion: * @test * @bug 8397189 test/jdk/jdk/jfr/event/io/TestSocketEvents.java line 2: > 1: /* > 2: * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights > reserved. Suggestion: * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. test/jdk/jdk/jfr/event/io/TestSocketEvents.java line 47: > 45: > 46: /** > 47: * @test Suggestion: * @test * @bug 8397189 ------------- PR Review: https://git.openjdk.org/jdk/pull/33860#pullrequestreview-5952912319 PR Review Comment: https://git.openjdk.org/jdk/pull/33860#discussion_r4611268454 PR Review Comment: https://git.openjdk.org/jdk/pull/33860#discussion_r4610889545 PR Review Comment: https://git.openjdk.org/jdk/pull/33860#discussion_r4611262363 PR Review Comment: https://git.openjdk.org/jdk/pull/33860#discussion_r4611072896 PR Review Comment: https://git.openjdk.org/jdk/pull/33860#discussion_r4611259366
