use of com.yahoo.jrt.slobrok.server.Slobrok in project vespa by vespa-engine.
the class SlobrokTestCase method setUp.
public void setUp() throws ListenFailedException, UnknownHostException {
slobrok = new Slobrok();
String slobrokCfgId = "raw:slobrok[1]\nslobrok[0].connectionspec \"" + new Spec("localhost", slobrok.port()).toString() + "\"\n";
net1 = new RPCNetwork(new RPCNetworkParams().setIdentity(new Identity("net/a")).setSlobrokConfigId(slobrokCfgId));
net2 = new RPCNetwork(new RPCNetworkParams().setIdentity(new Identity("net/b")).setSlobrokConfigId(slobrokCfgId));
net3 = new RPCNetwork(new RPCNetworkParams().setIdentity(new Identity("net/c")).setSlobrokConfigId(slobrokCfgId));
port1 = net1.getPort();
port2 = net2.getPort();
port3 = net3.getPort();
}
use of com.yahoo.jrt.slobrok.server.Slobrok in project vespa by vespa-engine.
the class PolicyFactoryTestCase method setUp.
@Override
public void setUp() throws ListenFailedException {
slobrok = new Slobrok();
srv = new TestServer(new MessageBusParams().addProtocol(new DocumentProtocol(new DocumentTypeManager())), new RPCNetworkParams().setSlobrokConfigId(TestServer.getSlobrokConfig(slobrok)));
src = srv.mb.createSourceSession(new SourceSessionParams().setReplyHandler(new Receptor()));
}
use of com.yahoo.jrt.slobrok.server.Slobrok in project vespa by vespa-engine.
the class RoutableFactoryTestCase method setUp.
@Override
public void setUp() throws ListenFailedException {
slobrok = new Slobrok();
DocumentTypeManager docMan = new DocumentTypeManager();
dstProtocol = new DocumentProtocol(docMan);
dstServer = new TestServer(new MessageBusParams().addProtocol(dstProtocol), new RPCNetworkParams().setIdentity(new Identity("dst")).setSlobrokConfigId(TestServer.getSlobrokConfig(slobrok)));
dstSession = dstServer.mb.createDestinationSession(new DestinationSessionParams().setName("session").setMessageHandler(new Receptor()));
srcProtocol = new DocumentProtocol(docMan);
srcServer = new TestServer(new MessageBusParams().addProtocol(srcProtocol), new RPCNetworkParams().setSlobrokConfigId(TestServer.getSlobrokConfig(slobrok)));
srcSession = srcServer.mb.createSourceSession(new SourceSessionParams().setReplyHandler(new Receptor()));
assertTrue(srcServer.waitSlobrok("dst/session", 1));
}
Aggregations