Search in sources :

Example 6 with ListenFailedException

use of com.yahoo.jrt.ListenFailedException in project vespa by vespa-engine.

the class SharedSourceSessionTestCase method requireThatMbusIsReleasedOnDestroy.

@Test
public void requireThatMbusIsReleasedOnDestroy() {
    Slobrok slobrok = null;
    try {
        slobrok = new Slobrok();
    } catch (ListenFailedException e) {
        fail();
    }
    RPCNetworkParams netParams = new RPCNetworkParams().setSlobrokConfigId(slobrok.configId());
    SharedMessageBus mbus = SharedMessageBus.newInstance(new MessageBusParams(), netParams);
    SharedSourceSession session = mbus.newSourceSession(new SourceSessionParams());
    mbus.release();
    session.release();
    assertFalse("MessageBus not destroyed by release().", mbus.messageBus().destroy());
}
Also used : RPCNetworkParams(com.yahoo.messagebus.network.rpc.RPCNetworkParams) Slobrok(com.yahoo.jrt.slobrok.server.Slobrok) MessageBusParams(com.yahoo.messagebus.MessageBusParams) SourceSessionParams(com.yahoo.messagebus.SourceSessionParams) ListenFailedException(com.yahoo.jrt.ListenFailedException) Test(org.junit.Test)

Aggregations

ListenFailedException (com.yahoo.jrt.ListenFailedException)6 Slobrok (com.yahoo.jrt.slobrok.server.Slobrok)3 RPCNetworkParams (com.yahoo.messagebus.network.rpc.RPCNetworkParams)3 Test (org.junit.Test)3 Acceptor (com.yahoo.jrt.Acceptor)1 Int32Value (com.yahoo.jrt.Int32Value)1 Request (com.yahoo.jrt.Request)1 Spec (com.yahoo.jrt.Spec)1 StringArray (com.yahoo.jrt.StringArray)1 StringValue (com.yahoo.jrt.StringValue)1 MessageBusParams (com.yahoo.messagebus.MessageBusParams)1 SourceSessionParams (com.yahoo.messagebus.SourceSessionParams)1 Node (com.yahoo.vdslib.state.Node)1 NodeState (com.yahoo.vdslib.state.NodeState)1 NodeType (com.yahoo.vdslib.state.NodeType)1 NodeInfo (com.yahoo.vespa.clustercontroller.core.NodeInfo)1 PrintWriter (java.io.PrintWriter)1 StringWriter (java.io.StringWriter)1 UnknownHostException (java.net.UnknownHostException)1 ArrayList (java.util.ArrayList)1