use of com.yahoo.messagebus.test.SimpleProtocol in project vespa by vespa-engine.
the class ClientThreadingTestCase method newMbusClient.
private static MbusClient newMbusClient(final LocalWire wire) {
final SharedMessageBus mbus = new SharedMessageBus(new MessageBus(new LocalNetwork(wire), new MessageBusParams().addProtocol(new SimpleProtocol())));
final SharedSourceSession session = mbus.newSourceSession(new SourceSessionParams());
final MbusClient client = new MbusClient(session);
session.release();
mbus.release();
return client;
}
use of com.yahoo.messagebus.test.SimpleProtocol in project vespa by vespa-engine.
the class ClientTestDriverTestCase method requireThatFactoryMethodsWork.
@Test
public void requireThatFactoryMethodsWork() throws ListenFailedException {
ClientTestDriver driver = ClientTestDriver.newInstance();
assertNotNull(driver);
assertTrue(driver.close());
driver = ClientTestDriver.newInstanceWithProtocol(new SimpleProtocol());
assertNotNull(driver);
assertTrue(driver.close());
Slobrok slobrok = new Slobrok();
driver = ClientTestDriver.newInstanceWithExternSlobrok(slobrok.configId());
assertNotNull(driver);
assertTrue(driver.close());
}
use of com.yahoo.messagebus.test.SimpleProtocol in project vespa by vespa-engine.
the class ServerTestDriverTestCase method requireThatFactoryMethodsWork.
@Test
public void requireThatFactoryMethodsWork() throws ListenFailedException {
ServerTestDriver driver = ServerTestDriver.newInstance(new NonWorkingRequestHandler());
assertNotNull(driver);
assertTrue(driver.close());
driver = ServerTestDriver.newInstanceWithProtocol(new SimpleProtocol(), new NonWorkingRequestHandler());
assertNotNull(driver);
assertTrue(driver.close());
Slobrok slobrok = new Slobrok();
driver = ServerTestDriver.newInstanceWithExternSlobrok(slobrok.configId(), new NonWorkingRequestHandler());
assertNotNull(driver);
assertTrue(driver.close());
}
use of com.yahoo.messagebus.test.SimpleProtocol in project vespa by vespa-engine.
the class SharedIntermediateSessionTestCase method newIntermediateSession.
private static SharedIntermediateSession newIntermediateSession(String slobrokId, IntermediateSessionParams params) {
RPCNetworkParams netParams = new RPCNetworkParams().setSlobrokConfigId(slobrokId);
MessageBusParams mbusParams = new MessageBusParams().addProtocol(new SimpleProtocol());
SharedMessageBus mbus = SharedMessageBus.newInstance(mbusParams, netParams);
SharedIntermediateSession session = mbus.newIntermediateSession(params);
mbus.release();
return session;
}
use of com.yahoo.messagebus.test.SimpleProtocol in project vespa by vespa-engine.
the class ServerThreadingTestCase method newMbusServer.
private static MbusServer newMbusServer(final CurrentContainer container, final LocalWire wire) {
final SharedMessageBus mbus = new SharedMessageBus(new MessageBus(new LocalNetwork(wire), new MessageBusParams().addProtocol(new SimpleProtocol())));
final SharedDestinationSession session = mbus.newDestinationSession(new DestinationSessionParams());
final MbusServer server = new MbusServer(container, session);
session.release();
mbus.release();
return server;
}
Aggregations