use of org.apache.qpid.server.virtualhostnode.TestVirtualHostNode in project qpid-broker-j by apache.
the class BrokerImplTest method createVhnWithVh.
private void createVhnWithVh(final BrokerImpl brokerImpl, int nameSuffix, final long totalQueueSize) {
final Map<String, Object> vhnAttributes = new HashMap<>();
vhnAttributes.put(VirtualHostNode.TYPE, TestVirtualHostNode.VIRTUAL_HOST_NODE_TYPE);
vhnAttributes.put(VirtualHostNode.NAME, "testVhn" + nameSuffix);
final DurableConfigurationStore store = mock(DurableConfigurationStore.class);
TestVirtualHostNode vhn = new TestVirtualHostNode(brokerImpl, vhnAttributes, store);
vhn.create();
final Map<String, Object> vhAttributes = new HashMap<>();
vhAttributes.put(VirtualHost.TYPE, TestMemoryVirtualHost.VIRTUAL_HOST_TYPE);
vhAttributes.put(VirtualHost.NAME, "testVh" + nameSuffix);
TestMemoryVirtualHost vh = new TestMemoryVirtualHost(vhAttributes, vhn) {
@Override
public long getTotalDepthOfQueuesBytes() {
return totalQueueSize;
}
};
vh.create();
}
Aggregations