use of com.yahoo.documentapi.messagebus.protocol.test.PolicyTestFrame in project vespa by vespa-engine.
the class StoragePolicyTestEnvironment method setUp.
@Override
public void setUp() throws Exception {
DocumentTypeManager manager = new DocumentTypeManager();
DocumentTypeManagerConfigurer.configure(manager, "file:./test/cfg/testdoc.cfg");
frame = new PolicyTestFrame(manager);
nodes = new TreeSet<>();
DocumentProtocol protocol = (DocumentProtocol) frame.getMessageBus().getProtocol((Utf8Array) DocumentProtocol.NAME);
policyFactory = new StoragePolicyTestFactory(nodes);
protocol.putRoutingPolicyFactory("storage", policyFactory);
frame.setMessage(createMessage("userdoc:ns:1:foo"));
frame.setHop(new HopSpec("test", "[storage:cluster=foo]"));
}
Aggregations