[NETCONF-1030] transport-tcp transport does not work with plain NioSocketChannel Created: 16/May/23  Updated: 03/Aug/23  Resolved: 03/Aug/23

Status: Resolved
Project: netconf
Component/s: transport
Affects Version/s: 6.0.0
Fix Version/s: 7.0.0, 6.0.1

Type: Bug Priority: Medium
Reporter: Ruslan Kashapov Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to NETCONF-590 Refactor NETCONF transport layer Resolved

 Description   

STR:

disable epoll test dependency in transport-tcp module (also works for transport-tls and transport-ssh) then execute unit tests within same module

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-transport-native-epoll</artifactId>
    <classifier>linux-x86_64</classifier>
    <scope>test</scope>
</dependency> 

Actual result:

NettyTransportSupport utility artifact fails initialization with exception

Caused by: java.lang.IllegalStateException: channel not registered to an event loop
    at io.netty.channel.AbstractChannel.eventLoop(AbstractChannel.java:164)
    at io.netty.channel.nio.AbstractNioChannel.eventLoop(AbstractNioChannel.java:113)
    at io.netty.channel.nio.AbstractNioChannel.eventLoop(AbstractNioChannel.java:48)
    at io.netty.channel.AbstractChannelHandlerContext.executor(AbstractChannelHandlerContext.java:132)
    at io.netty.channel.AbstractChannelHandlerContext.newPromise(AbstractChannelHandlerContext.java:995)
    at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:560)
    at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:957)
    at io.netty.channel.AbstractChannel.close(AbstractChannel.java:244)
    at org.opendaylight.netconf.transport.tcp.NioNettyImpl.<init>(NioNettyImpl.java:108)
    at org.opendaylight.netconf.transport.tcp.NettyTransportSupport.<clinit>(NettyTransportSupport.java:33) 

Expected:
Both Epoll and Nio Netty transports expected to be supported and covered with unit test (at least in tcp-transport), test dependency on netty-transport-native-epoll artifact should not be mandatory for modules using transport 


Generated at Wed Feb 07 20:16:30 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.