use of com.hazelcast.instance.impl.DefaultNodeContext in project hazelcast by hazelcast.
the class CustomNodeExtensionTestInstanceFactory method newHazelcastInstance.
@Override
public HazelcastInstance newHazelcastInstance(Config config) {
String instanceName = config != null ? config.getInstanceName() : null;
NodeContext nodeContext;
if (TestEnvironment.isMockNetwork()) {
config = initOrCreateConfig(config);
nodeContext = this.registry.createNodeContext(this.nextAddress(config.getNetworkConfig().getPort()));
} else {
nodeContext = new DefaultNodeContext();
}
return HazelcastInstanceFactory.newHazelcastInstance(config, instanceName, new WanServiceMockingNodeContext(nodeContext, nodeExtensionFn));
}
Aggregations