io.netty.testsuite.transport.TestsuitePermutation Java Examples

The following examples show how to use io.netty.testsuite.transport.TestsuitePermutation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KQueueSocketTestPermutation.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
public List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> datagram() {
    // Make the list of Bootstrap factories.
    @SuppressWarnings("unchecked")
    List<BootstrapFactory<Bootstrap>> bfs = Arrays.asList(
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(nioWorkerGroup).channelFactory(new ChannelFactory<Channel>() {
                        @Override
                        public Channel newChannel() {
                            return new NioDatagramChannel(InternetProtocolFamily.IPv4);
                        }

                        @Override
                        public String toString() {
                            return NioDatagramChannel.class.getSimpleName() + ".class";
                        }
                    });
                }
            },
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(KQUEUE_WORKER_GROUP).channel(KQueueDatagramChannel.class);
                }
            }
    );
    return combo(bfs, bfs);
}
 
Example #2
Source File: EpollSocketTestPermutation.java    From netty4.0.27Learn with Apache License 2.0 5 votes vote down vote up
@Override
public List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> datagram() {
    // Make the list of Bootstrap factories.
    List<BootstrapFactory<Bootstrap>> bfs = Arrays.asList(
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(nioWorkerGroup).channelFactory(new ChannelFactory<Channel>() {
                        @Override
                        public Channel newChannel() {
                            return new NioDatagramChannel(InternetProtocolFamily.IPv4);
                        }

                        @Override
                        public String toString() {
                            return NioDatagramChannel.class.getSimpleName() + ".class";
                        }
                    });
                }
            },
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(EPOLL_WORKER_GROUP).channel(EpollDatagramChannel.class);
                }
            }
    );
    return combo(bfs, bfs);
}
 
Example #3
Source File: EpollSocketTestPermutation.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
public List<TestsuitePermutation.BootstrapComboFactory<Bootstrap, Bootstrap>> datagram() {
    // Make the list of Bootstrap factories.
    @SuppressWarnings("unchecked")
    List<BootstrapFactory<Bootstrap>> bfs = Arrays.asList(
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(nioWorkerGroup).channelFactory(new ChannelFactory<Channel>() {
                        @Override
                        public Channel newChannel() {
                            return new NioDatagramChannel(InternetProtocolFamily.IPv4);
                        }

                        @Override
                        public String toString() {
                            return NioDatagramChannel.class.getSimpleName() + ".class";
                        }
                    });
                }
            },
            new BootstrapFactory<Bootstrap>() {
                @Override
                public Bootstrap newInstance() {
                    return new Bootstrap().group(EPOLL_WORKER_GROUP).channel(EpollDatagramChannel.class);
                }
            }
    );
    return combo(bfs, bfs);
}
 
Example #4
Source File: XnioTestsuiteUtils.java    From netty-xnio-transport with Apache License 2.0 5 votes vote down vote up
static List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return Collections.<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>>singletonList(
            new TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>() {
                @Override
                public ServerBootstrap newServerInstance() {
                    return new ServerBootstrap().channel(XnioServerSocketChannel.class).group(GROUP);
                }

                @Override
                public Bootstrap newClientInstance() {
                    return new Bootstrap().channel(XnioSocketChannel.class).group(GROUP);
                }
            });
}
 
Example #5
Source File: KQueueSocketMultipleConnectTest.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> factories
            = new ArrayList<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>>();
    for (TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap> comboFactory
            : KQueueSocketTestPermutation.INSTANCE.socket()) {
        EventLoopGroup group = comboFactory.newClientInstance().config().group();
        if (group instanceof NioEventLoopGroup || group instanceof KQueueEventLoopGroup) {
            factories.add(comboFactory);
        }
    }
    return factories;
}
 
Example #6
Source File: SocketMultipleConnectTest.java    From netty-4.1.22 with Apache License 2.0 5 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> factories
            = new ArrayList<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>>();
    for (TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap> comboFactory
            : SocketTestPermutation.INSTANCE.socket()) {
        if (comboFactory.newClientInstance().config().group() instanceof NioEventLoopGroup) {
            factories.add(comboFactory);
        }
    }
    return factories;
}
 
Example #7
Source File: EpollSocketSslEchoTest.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #8
Source File: EpollSocketStringEchoTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #9
Source File: XnioSocketStartTlsTest.java    From netty-xnio-transport with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return XnioTestsuiteUtils.newFactories();
}
 
Example #10
Source File: EpollSocketRstTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #11
Source File: EpollSocketFileRegionTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #12
Source File: EpollSocketFixedLengthEchoTest.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #13
Source File: EpollETSocketConditionalWritabilityTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #14
Source File: EpollDomainSocketSslEchoTest.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.domainSocket();
}
 
Example #15
Source File: EpollSocketCloseForciblyTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #16
Source File: EpollDomainSocketFileRegionTest.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.domainSocket();
}
 
Example #17
Source File: EpollSocketObjectEchoTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #18
Source File: EpollCompositeBufferGatheringWriteTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #19
Source File: XnioSocketObjectEchoTest.java    From netty-xnio-transport with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return XnioTestsuiteUtils.newFactories();
}
 
Example #20
Source File: EpollSocketConnectTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #21
Source File: EpollETSocketHalfClosed.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #22
Source File: EpollETSocketExceptionHandlingTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #23
Source File: AbstractSocketTest.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return SocketTestPermutation.INSTANCE.socket();
}
 
Example #24
Source File: EpollLTSocketHalfClosed.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #25
Source File: EpollLTSocketExceptionHandlingTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.socket();
}
 
Example #26
Source File: EpollDomainSocketFdTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.domainSocket();
}
 
Example #27
Source File: EpollSocketConnectionAttemptTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapFactory<Bootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.clientSocket();
}
 
Example #28
Source File: KQueueDomainSocketFileRegionTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.domainSocket();
}
 
Example #29
Source File: KQueueDomainSocketEchoTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> newFactories() {
    return KQueueSocketTestPermutation.INSTANCE.domainSocket();
}
 
Example #30
Source File: EpollSocketShutdownOutputByPeerTest.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected List<TestsuitePermutation.BootstrapFactory<ServerBootstrap>> newFactories() {
    return EpollSocketTestPermutation.INSTANCE.serverSocket();
}