Search in sources :

Example 1 with OperationProcessingChain

use of com.vmware.xenon.common.OperationProcessingChain in project photon-model by vmware.

the class BaseTestCase method createHost.

protected VerificationHost createHost() throws Throwable {
    ServiceHost.Arguments args = new ServiceHost.Arguments();
    // ask runtime to pick a random storage location
    args.sandbox = null;
    // ask runtime to pick a random port
    args.port = 0;
    Map<Class<? extends Service>, Class<? extends OperationProcessingChain>> chains = new HashMap<>();
    customizeChains(chains);
    VerificationHost h = VerificationHost.initialize(new CustomizationVerificationHost(chains), args);
    h.setMaintenanceIntervalMicros(this.getMaintenanceIntervalMillis() * 1000);
    h.setTimeoutSeconds(HOST_TIMEOUT_SECONDS);
    h.setPeerSynchronizationEnabled(this.getPeerSynchronizationEnabled());
    h.start();
    return h;
}
Also used : HashMap(java.util.HashMap) Service(com.vmware.xenon.common.Service) StatefulService(com.vmware.xenon.common.StatefulService) FactoryService(com.vmware.xenon.common.FactoryService) ServiceHost(com.vmware.xenon.common.ServiceHost) OperationProcessingChain(com.vmware.xenon.common.OperationProcessingChain) VerificationHost(com.vmware.xenon.common.test.VerificationHost)

Aggregations

FactoryService (com.vmware.xenon.common.FactoryService)1 OperationProcessingChain (com.vmware.xenon.common.OperationProcessingChain)1 Service (com.vmware.xenon.common.Service)1 ServiceHost (com.vmware.xenon.common.ServiceHost)1 StatefulService (com.vmware.xenon.common.StatefulService)1 VerificationHost (com.vmware.xenon.common.test.VerificationHost)1 HashMap (java.util.HashMap)1