From 9e6a3d6483e597b2e7452d047a74cc7ffa5f319b Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 1 Sep 2020 21:22:07 +0200 Subject: [PATCH] Add more tests from the testsuite for io_uring Motivation: We need more testing for io_uring to be consistent with the others transports Modifications: Add more tests by extending the testsuite (still some to add) and mark failing tests as ignore. These ignored tests should be fixed one by one in followup commits Results: More testing --- .../uring/IOUringSocketAutoReadTest.java | 30 ++++++++++++ ...UringSocketChannelNotYetConnectedTest.java | 29 +++++++++++ .../uring/IOUringSocketCloseForciblyTest.java | 39 +++++++++++++++ ...UringSocketConditionalWritabilityTest.java | 30 ++++++++++++ .../uring/IOUringSocketConnectTest.java | 40 ++++++++++++++++ .../IOUringSocketConnectionAttemptTest.java | 38 +++++++++++++++ ...IOUringSocketDataReadInitialStateTest.java | 30 ++++++++++++ .../IOUringSocketExceptionHandlingTest.java | 30 ++++++++++++ .../IOUringSocketGatheringWriteTest.java | 31 ++++++++++++ .../uring/IOUringSocketHalfClosedTest.java | 45 +++++++++++++++++ .../IOUringSocketMultipleConnectTest.java | 43 +++++++++++++++++ .../uring/IOUringSocketReadPendingTest.java | 39 +++++++++++++++ .../channel/uring/IOUringSocketRstTest.java | 48 +++++++++++++++++++ 13 files changed, 472 insertions(+) create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketAutoReadTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketChannelNotYetConnectedTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketCloseForciblyTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConditionalWritabilityTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectionAttemptTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketDataReadInitialStateTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketExceptionHandlingTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketGatheringWriteTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketHalfClosedTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketMultipleConnectTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketReadPendingTest.java create mode 100644 transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketRstTest.java diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketAutoReadTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketAutoReadTest.java new file mode 100644 index 0000000000..493757b871 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketAutoReadTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketAutoReadTest; + +import java.util.List; + +public class IOUringSocketAutoReadTest extends SocketAutoReadTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketChannelNotYetConnectedTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketChannelNotYetConnectedTest.java new file mode 100644 index 0000000000..2dbbd257b8 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketChannelNotYetConnectedTest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketChannelNotYetConnectedTest; + +import java.util.List; + +public class IOUringSocketChannelNotYetConnectedTest extends SocketChannelNotYetConnectedTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.clientSocket(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketCloseForciblyTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketCloseForciblyTest.java new file mode 100644 index 0000000000..626df4274c --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketCloseForciblyTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketCloseForciblyTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.List; + +public class IOUringSocketCloseForciblyTest extends SocketCloseForciblyTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } + + @Ignore("FIX ME") + @Test + @Override + public void testCloseForcibly() throws Throwable { + super.testCloseForcibly(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConditionalWritabilityTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConditionalWritabilityTest.java new file mode 100644 index 0000000000..c980e63cc8 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConditionalWritabilityTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketConditionalWritabilityTest; + +import java.util.List; + +public class IOUringSocketConditionalWritabilityTest extends SocketConditionalWritabilityTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectTest.java new file mode 100644 index 0000000000..9c8f87dc64 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketConnectTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.List; + +public class IOUringSocketConnectTest extends SocketConnectTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } + + @Ignore + @Test + @Override + public void testLocalAddressAfterConnect() throws Throwable { + super.testLocalAddressAfterConnect(); + } + +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectionAttemptTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectionAttemptTest.java new file mode 100644 index 0000000000..c85f32b7fe --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketConnectionAttemptTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketConnectionAttemptTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.List; + +public class IOUringSocketConnectionAttemptTest extends SocketConnectionAttemptTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.clientSocket(); + } + + @Ignore("FIX ME") + @Test + @Override + public void testConnectTimeout() throws Throwable { + super.testConnectTimeout(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketDataReadInitialStateTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketDataReadInitialStateTest.java new file mode 100644 index 0000000000..17f7be2af0 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketDataReadInitialStateTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketDataReadInitialStateTest; + +import java.util.List; + +public class IOUringSocketDataReadInitialStateTest extends SocketDataReadInitialStateTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } +} \ No newline at end of file diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketExceptionHandlingTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketExceptionHandlingTest.java new file mode 100644 index 0000000000..bbb9462f62 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketExceptionHandlingTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketExceptionHandlingTest; + +import java.util.List; + +public class IOUringSocketExceptionHandlingTest extends SocketExceptionHandlingTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } +} \ No newline at end of file diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketGatheringWriteTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketGatheringWriteTest.java new file mode 100644 index 0000000000..88872197ed --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketGatheringWriteTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketGatheringWriteTest; + +import java.util.List; + +public class IOUringSocketGatheringWriteTest extends SocketGatheringWriteTest { + + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketHalfClosedTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketHalfClosedTest.java new file mode 100644 index 0000000000..bd468198fb --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketHalfClosedTest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketHalfClosedTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.List; + +public class IOUringSocketHalfClosedTest extends SocketHalfClosedTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } + + @Ignore("FIX ME") + @Test + public void testHalfClosureOnlyOneEventWhenAutoRead() throws Throwable { + super.testHalfClosureOnlyOneEventWhenAutoRead(); + } + + + @Ignore("FIX ME") + @Test + public void testAutoCloseFalseDoesShutdownOutput() throws Throwable { + super.testAutoCloseFalseDoesShutdownOutput(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketMultipleConnectTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketMultipleConnectTest.java new file mode 100644 index 0000000000..153e336718 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketMultipleConnectTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketMultipleConnectTest; + +import java.util.ArrayList; +import java.util.List; + +public class IOUringSocketMultipleConnectTest extends SocketMultipleConnectTest { + + @Override + protected List> newFactories() { + List> factories + = new ArrayList>(); + for (TestsuitePermutation.BootstrapComboFactory comboFactory + : IOUringSocketTestPermutation.INSTANCE.socket()) { + EventLoopGroup group = comboFactory.newClientInstance().config().group(); + if (group instanceof NioEventLoopGroup || group instanceof IOUringEventLoop) { + factories.add(comboFactory); + } + } + return factories; + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketReadPendingTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketReadPendingTest.java new file mode 100644 index 0000000000..5bb1c73796 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketReadPendingTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketReadPendingTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.List; + +public class IOUringSocketReadPendingTest extends SocketReadPendingTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } + + @Ignore("FIX ME") + @Test + @Override + public void testReadPendingIsResetAfterEachRead() throws Throwable { + super.testReadPendingIsResetAfterEachRead(); + } +} diff --git a/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketRstTest.java b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketRstTest.java new file mode 100644 index 0000000000..e7e5d08c87 --- /dev/null +++ b/transport-native-io_uring/src/test/java/io/netty/channel/uring/IOUringSocketRstTest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2020 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ +package io.netty.channel.uring; + +import io.netty.bootstrap.Bootstrap; +import io.netty.bootstrap.ServerBootstrap; +import io.netty.channel.Channel; +import io.netty.channel.unix.Errors; +import io.netty.testsuite.transport.TestsuitePermutation; +import io.netty.testsuite.transport.socket.SocketRstTest; + +import java.io.IOException; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class IOUringSocketRstTest extends SocketRstTest { + @Override + protected List> newFactories() { + return IOUringSocketTestPermutation.INSTANCE.socket(); + } + + @Override + protected void assertRstOnCloseException(IOException cause, Channel clientChannel) { + if (!AbstractIOUringChannel.class.isInstance(clientChannel)) { + super.assertRstOnCloseException(cause, clientChannel); + return; + } + + assertTrue("actual [type, message]: [" + cause.getClass() + ", " + cause.getMessage() + "]", + cause instanceof Errors.NativeIoException); + assertEquals(Errors.ERRNO_ECONNRESET_NEGATIVE, ((Errors.NativeIoException) cause).expectedErr()); + } +}