franz1981 commented on a change in pull request #45:
URL: https://github.com/apache/qpid-jms/pull/45#discussion_r820867326
##########
File path:
qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/netty/NettyTcpTransportTest.java
##########
@@ -730,14 +821,30 @@ private void assertEpoll(String message, boolean
expected, Transport transport)
}
}
- assertNotNull("Transport implementation unknown", group);
+ assertNotNull("Transport implementation unknown", groupRefField);
- group.setAccessible(true);
- if (expected) {
- assertTrue(message, group.get(transport) instanceof
EpollEventLoopGroup);
- } else {
- assertFalse(message, group.get(transport) instanceof
EpollEventLoopGroup);
+ groupRefField.setAccessible(true);
+ return (EventLoopGroupRef) groupRefField.get(transport);
+ }
+
+ private static void assertEventLoopGroupType(String message, Transport
transport) throws Exception {
+ final EventLoopGroupRef groupRef = getGroupRef(transport);
+ Class<? extends EventLoopGroup> eventLoopGroupClass = null;
+ switch (groupRef.type()) {
+
+ case EPOLL:
+ eventLoopGroupClass = EpollEventLoopGroup.class;
+ break;
+ case KQUEUE:
+ eventLoopGroupClass = KQueueEventLoopGroup.class;
+ break;
+ case NIO:
+ eventLoopGroupClass = NioEventLoopGroup.class;
+ break;
+ default:
+ fail("Unsupported type: " + groupRef.type());
Review comment:
let me change this, right!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]