*/
package org.opendaylight.protocol.bgp.peer.acceptor;
-import static org.opendaylight.protocol.bgp.rib.impl.CheckUtil.waitFutureSuccess;
+import static org.opendaylight.protocol.bgp.rib.impl.CheckUtil.checkIdleState;
+import static org.opendaylight.protocol.util.CheckUtil.waitFutureSuccess;
import com.google.common.collect.Sets;
import io.netty.util.concurrent.Future;
@Test
public void testBGPPeerAcceptorImpl() throws Exception {
final InetSocketAddress inetServerAddress = InetSocketAddressUtil.getRandomLoopbackInetSocketAddress();
- final IpAddress serverIpAddress = new IpAddress(new Ipv4Address(InetSocketAddressUtil.toHostAndPort(inetServerAddress).getHostText()));
+ final IpAddress serverIpAddress = new IpAddress(new Ipv4Address(InetSocketAddressUtil.toHostAndPort(inetServerAddress).getHost()));
final PortNumber portNumber = new PortNumber(InetSocketAddressUtil.toHostAndPort(inetServerAddress).getPort());
this.registry.addPeer(serverIpAddress, this.serverListener, createPreferences(inetServerAddress));
final BGPPeerAcceptorImpl bgpPeerAcceptor = new BGPPeerAcceptorImpl(serverIpAddress, portNumber,
- this.registry, this.serverDispatcher);
+ this.serverDispatcher);
bgpPeerAcceptor.start();
final Future<BGPSessionImpl> futureClient = this.clientDispatcher
- .createClient(this.clientAddress, inetServerAddress, this.registry, 2, true);
+ .createClient(this.clientAddress, inetServerAddress, 2, true);
waitFutureSuccess(futureClient);
final BGPSessionImpl session = futureClient.get();
Assert.assertEquals(State.UP, this.clientListener.getState());
bgpPeerAcceptor.close();
}
-}
\ No newline at end of file
+}