org.apache.catalina.tribes.TesterUtil Java Examples

The following examples show how to use org.apache.catalina.tribes.TesterUtil. 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: TestTcpFailureDetector.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel2 = new GroupChannel();
    channel1.getMembershipService().setPayload("Channel-1".getBytes("ASCII"));
    channel2.getMembershipService().setPayload("Channel-2".getBytes("ASCII"));
    mbrlist1 = new TestMbrListener("Channel-1");
    mbrlist2 = new TestMbrListener("Channel-2");
    tcpFailureDetector1 = new TcpFailureDetector();
    tcpFailureDetector2 = new TcpFailureDetector();
    channel1.addInterceptor(tcpFailureDetector1);
    channel2.addInterceptor(tcpFailureDetector2);
    channel1.addMembershipListener(mbrlist1);
    channel2.addMembershipListener(mbrlist2);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
}
 
Example #2
Source File: TestUdpPackages.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatch15Interceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatch15Interceptor());
    ThroughputInterceptor tint = new ThroughputInterceptor();
    tint.setInterval(500);
    ThroughputInterceptor tint2 = new ThroughputInterceptor();
    tint2.setInterval(500);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #3
Source File: TestMulticastPackages.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatch15Interceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatch15Interceptor());
    ThroughputInterceptor tint = new ThroughputInterceptor();
    tint.setInterval(500);
    ThroughputInterceptor tint2 = new ThroughputInterceptor();
    tint2.setInterval(500);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #4
Source File: TestTcpFailureDetector.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel2 = new GroupChannel();
    channel1.getMembershipService().setPayload("Channel-1".getBytes("ASCII"));
    channel2.getMembershipService().setPayload("Channel-2".getBytes("ASCII"));
    mbrlist1 = new TestMbrListener("Channel-1");
    mbrlist2 = new TestMbrListener("Channel-2");
    tcpFailureDetector1 = new TcpFailureDetector();
    tcpFailureDetector2 = new TcpFailureDetector();
    channel1.addInterceptor(tcpFailureDetector1);
    channel2.addInterceptor(tcpFailureDetector2);
    channel1.addMembershipListener(mbrlist1);
    channel2.addMembershipListener(mbrlist2);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
}
 
Example #5
Source File: TestUdpPackages.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatch15Interceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatch15Interceptor());
    ThroughputInterceptor tint = new ThroughputInterceptor();
    tint.setInterval(500);
    ThroughputInterceptor tint2 = new ThroughputInterceptor();
    tint2.setInterval(500);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #6
Source File: TestMulticastPackages.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatch15Interceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatch15Interceptor());
    ThroughputInterceptor tint = new ThroughputInterceptor();
    tint.setInterval(500);
    ThroughputInterceptor tint2 = new ThroughputInterceptor();
    tint2.setInterval(500);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #7
Source File: TestUdpPackages.java    From Tomcat8-Source-Read with MIT License 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatchInterceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatchInterceptor());
    ThroughputInterceptor tint = new ThroughputInterceptor();
    tint.setInterval(500);
    ThroughputInterceptor tint2 = new ThroughputInterceptor();
    tint2.setInterval(500);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #8
Source File: TestMulticastPackages.java    From Tomcat8-Source-Read with MIT License 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatchInterceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatchInterceptor());
    ThroughputInterceptor tint = new ThroughputInterceptor();
    tint.setInterval(500);
    ThroughputInterceptor tint2 = new ThroughputInterceptor();
    tint2.setInterval(500);
    //channel1.addInterceptor(tint);
    channel2.addInterceptor(tint2);
    listener1 = new Listener();
    ReceiverBase rb1 = (ReceiverBase)channel1.getChannelReceiver();
    ReceiverBase rb2 = (ReceiverBase)channel2.getChannelReceiver();
    rb1.setUdpPort(50000);
    rb2.setUdpPort(50000);
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #9
Source File: TestTcpFailureDetector.java    From Tomcat8-Source-Read with MIT License 6 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel2 = new GroupChannel();
    channel1.getMembershipService().setPayload("Channel-1".getBytes("ASCII"));
    channel2.getMembershipService().setPayload("Channel-2".getBytes("ASCII"));
    mbrlist1 = new TestMbrListener("Channel-1");
    mbrlist2 = new TestMbrListener("Channel-2");
    tcpFailureDetector1 = new TcpFailureDetector();
    tcpFailureDetector2 = new TcpFailureDetector();
    channel1.addInterceptor(tcpFailureDetector1);
    channel2.addInterceptor(tcpFailureDetector2);
    channel1.addMembershipListener(mbrlist1);
    channel2.addMembershipListener(mbrlist2);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
}
 
Example #10
Source File: TestGroupChannelMemberArrival.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    for (int i = 0; i < channels.length; i++) {
        channels[i] = new GroupChannel();
        channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII"));
        listeners[i] = new TestMbrListener( ("Listener-" + (i + 1)));
        channels[i].addMembershipListener(listeners[i]);
    }
    TesterUtil.addRandomDomain(channels);
}
 
Example #11
Source File: TestRemoteProcessException.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel2 = new GroupChannel();
    listener1 = new Listener();
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #12
Source File: TestRemoteProcessException.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel2 = new GroupChannel();
    listener1 = new Listener();
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #13
Source File: TestDataIntegrity.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatch15Interceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatch15Interceptor());
    listener1 = new Listener();
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #14
Source File: TestOrderInterceptor.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    System.out.println("Setup");
    channels = new GroupChannel[channelCount];
    orderitcs = new OrderInterceptor[channelCount];
    mangleitcs = new MangleOrderInterceptor[channelCount];
    test = new TestListener[channelCount];
    threads = new Thread[channelCount];
    for ( int i=0; i<channelCount; i++ ) {
        channels[i] = new GroupChannel();

        orderitcs[i] = new OrderInterceptor();
        mangleitcs[i] = new MangleOrderInterceptor();
        orderitcs[i].setExpire(Long.MAX_VALUE);
        channels[i].addInterceptor(orderitcs[i]);
        channels[i].addInterceptor(mangleitcs[i]);
        test[i] = new TestListener(i);
        channels[i].addChannelListener(test[i]);
        final int j = i;
        threads[i] = new Thread() {
            @Override
            public void run() {
                try {
                    channels[j].start(Channel.DEFAULT);
                    Thread.sleep(50);
                } catch (Exception x) {
                    x.printStackTrace();
                }
            }
        };
    }
    TesterUtil.addRandomDomain(channels);
    for ( int i=0; i<channelCount; i++ ) threads[i].start();
    for ( int i=0; i<channelCount; i++ ) threads[i].join();
    Thread.sleep(1500);
}
 
Example #15
Source File: TestNonBlockingCoordinator.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    System.out.println("Setup");
    channels = new GroupChannel[CHANNEL_COUNT];
    coordinators = new NonBlockingCoordinator[CHANNEL_COUNT];
    Thread[] threads = new Thread[CHANNEL_COUNT];
    for ( int i=0; i<CHANNEL_COUNT; i++ ) {
        channels[i] = new GroupChannel();
        coordinators[i] = new NonBlockingCoordinator();
        channels[i].addInterceptor(coordinators[i]);
        channels[i].addInterceptor(new TcpFailureDetector());
        final int j = i;
        threads[i] = new Thread() {
            @Override
            public void run() {
                try {
                    channels[j].start(Channel.DEFAULT);
                    Thread.sleep(50);
                } catch (Exception x) {
                    x.printStackTrace();
                }
            }
        };
    }
    TesterUtil.addRandomDomain(channels);
    for (int i = 0; i < CHANNEL_COUNT; i++) {
        threads[i].start();
    }
    for (int i = 0; i < CHANNEL_COUNT; i++) {
        threads[i].join();
    }
    Thread.sleep(1000);
}
 
Example #16
Source File: TestNonBlockingCoordinator.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    System.out.println("Setup");
    channels = new GroupChannel[CHANNEL_COUNT];
    coordinators = new NonBlockingCoordinator[CHANNEL_COUNT];
    Thread[] threads = new Thread[CHANNEL_COUNT];
    for ( int i=0; i<CHANNEL_COUNT; i++ ) {
        channels[i] = new GroupChannel();
        coordinators[i] = new NonBlockingCoordinator();
        channels[i].addInterceptor(coordinators[i]);
        channels[i].addInterceptor(new TcpFailureDetector());
        final int j = i;
        threads[i] = new Thread() {
            @Override
            public void run() {
                try {
                    channels[j].start(Channel.DEFAULT);
                    Thread.sleep(50);
                } catch (Exception x) {
                    x.printStackTrace();
                }
            }
        };
    }
    TesterUtil.addRandomDomain(channels);
    for (int i = 0; i < CHANNEL_COUNT; i++) {
        threads[i].start();
    }
    for (int i = 0; i < CHANNEL_COUNT; i++) {
        threads[i].join();
    }
    Thread.sleep(1000);
}
 
Example #17
Source File: TestOrderInterceptor.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    System.out.println("Setup");
    channels = new GroupChannel[channelCount];
    orderitcs = new OrderInterceptor[channelCount];
    mangleitcs = new MangleOrderInterceptor[channelCount];
    test = new TestListener[channelCount];
    threads = new Thread[channelCount];
    for ( int i=0; i<channelCount; i++ ) {
        channels[i] = new GroupChannel();

        orderitcs[i] = new OrderInterceptor();
        mangleitcs[i] = new MangleOrderInterceptor();
        orderitcs[i].setExpire(Long.MAX_VALUE);
        channels[i].addInterceptor(orderitcs[i]);
        channels[i].addInterceptor(mangleitcs[i]);
        test[i] = new TestListener(i);
        channels[i].addChannelListener(test[i]);
        final int j = i;
        threads[i] = new Thread() {
            @Override
            public void run() {
                try {
                    channels[j].start(Channel.DEFAULT);
                    Thread.sleep(50);
                } catch (Exception x) {
                    x.printStackTrace();
                }
            }
        };
    }
    TesterUtil.addRandomDomain(channels);
    for ( int i=0; i<channelCount; i++ ) threads[i].start();
    for ( int i=0; i<channelCount; i++ ) threads[i].join();
    Thread.sleep(1000);
}
 
Example #18
Source File: TestGroupChannelMemberArrival.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    for (int i = 0; i < channels.length; i++) {
        channels[i] = new GroupChannel();
        channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII"));
        listeners[i] = new TestMbrListener( ("Listener-" + (i + 1)));
        channels[i].addMembershipListener(listeners[i]);
    }
    TesterUtil.addRandomDomain(channels);
}
 
Example #19
Source File: TestGroupChannelSenderConnections.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    for (int i = 0; i < channels.length; i++) {
        channels[i] = new GroupChannel();
        channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII"));
        listeners[i] = new TestMsgListener( ("Listener-" + (i + 1)));
        channels[i].addChannelListener(listeners[i]);
    }
    TesterUtil.addRandomDomain(channels);
    for (int i = 0; i < channels.length; i++) {
        channels[i].start(Channel.SND_RX_SEQ|Channel.SND_TX_SEQ);
    }
}
 
Example #20
Source File: TestRemoteProcessException.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel2 = new GroupChannel();
    listener1 = new Listener();
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #21
Source File: TestDataIntegrity.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatch15Interceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatch15Interceptor());
    listener1 = new Listener();
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}
 
Example #22
Source File: TestGroupChannelSenderConnections.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    for (int i = 0; i < channels.length; i++) {
        channels[i] = new GroupChannel();
        channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII"));
        listeners[i] = new TestMsgListener( ("Listener-" + (i + 1)));
        channels[i].addChannelListener(listeners[i]);
    }
    TesterUtil.addRandomDomain(channels);
    for (int i = 0; i < channels.length; i++) {
        channels[i].start(Channel.SND_RX_SEQ|Channel.SND_TX_SEQ);
    }
}
 
Example #23
Source File: TestNonBlockingCoordinator.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    System.out.println("Setup");
    channels = new GroupChannel[CHANNEL_COUNT];
    coordinators = new NonBlockingCoordinator[CHANNEL_COUNT];
    Thread[] threads = new Thread[CHANNEL_COUNT];
    for ( int i=0; i<CHANNEL_COUNT; i++ ) {
        channels[i] = new GroupChannel();
        coordinators[i] = new NonBlockingCoordinator();
        channels[i].addInterceptor(coordinators[i]);
        channels[i].addInterceptor(new TcpFailureDetector());
        final int j = i;
        threads[i] = new Thread() {
            @Override
            public void run() {
                try {
                    channels[j].start(Channel.DEFAULT);
                    Thread.sleep(50);
                } catch (Exception x) {
                    x.printStackTrace();
                }
            }
        };
    }
    TesterUtil.addRandomDomain(channels);
    for (int i = 0; i < CHANNEL_COUNT; i++) {
        threads[i].start();
    }
    for (int i = 0; i < CHANNEL_COUNT; i++) {
        threads[i].join();
    }
    Thread.sleep(1000);
}
 
Example #24
Source File: TestOrderInterceptor.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    System.out.println("Setup");
    channels = new GroupChannel[channelCount];
    orderitcs = new OrderInterceptor[channelCount];
    mangleitcs = new MangleOrderInterceptor[channelCount];
    test = new TestListener[channelCount];
    threads = new Thread[channelCount];
    for ( int i=0; i<channelCount; i++ ) {
        channels[i] = new GroupChannel();

        orderitcs[i] = new OrderInterceptor();
        mangleitcs[i] = new MangleOrderInterceptor();
        orderitcs[i].setExpire(Long.MAX_VALUE);
        channels[i].addInterceptor(orderitcs[i]);
        channels[i].addInterceptor(mangleitcs[i]);
        test[i] = new TestListener(i);
        channels[i].addChannelListener(test[i]);
        final int j = i;
        threads[i] = new Thread() {
            @Override
            public void run() {
                try {
                    channels[j].start(Channel.DEFAULT);
                    Thread.sleep(50);
                } catch (Exception x) {
                    x.printStackTrace();
                }
            }
        };
    }
    TesterUtil.addRandomDomain(channels);
    for ( int i=0; i<channelCount; i++ ) threads[i].start();
    for ( int i=0; i<channelCount; i++ ) threads[i].join();
    Thread.sleep(1000);
}
 
Example #25
Source File: TestGroupChannelMemberArrival.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    for (int i = 0; i < channels.length; i++) {
        channels[i] = new GroupChannel();
        channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII"));
        listeners[i] = new TestMbrListener( ("Listener-" + (i + 1)));
        channels[i].addMembershipListener(listeners[i]);
    }
    TesterUtil.addRandomDomain(channels);
}
 
Example #26
Source File: TestGroupChannelSenderConnections.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    for (int i = 0; i < channels.length; i++) {
        channels[i] = new GroupChannel();
        channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII"));
        listeners[i] = new TestMsgListener( ("Listener-" + (i + 1)));
        channels[i].addChannelListener(listeners[i]);
    }
    TesterUtil.addRandomDomain(channels);
    for (int i = 0; i < channels.length; i++) {
        channels[i].start(Channel.SND_RX_SEQ|Channel.SND_TX_SEQ);
    }
}
 
Example #27
Source File: TestDataIntegrity.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    channel1 = new GroupChannel();
    channel1.addInterceptor(new MessageDispatchInterceptor());
    channel2 = new GroupChannel();
    channel2.addInterceptor(new MessageDispatchInterceptor());
    listener1 = new Listener();
    channel2.addChannelListener(listener1);
    TesterUtil.addRandomDomain(new ManagedChannel[] {channel1, channel2});
    channel1.start(Channel.DEFAULT);
    channel2.start(Channel.DEFAULT);
}