use of com.tencent.polaris.test.mock.discovery.NamingServer in project sofa-rpc by sofastack.
the class PolarisRegistryTest method setup.
@BeforeClass
public static void setup() {
polaris = new NamingServer(8091);
polaris.getNamingService().addService(new ServiceKey(NAMESPACE, SERVICE_1));
try {
polaris.start();
} catch (IOException e) {
e.printStackTrace();
return;
}
registryConfig = new RegistryConfig().setProtocol("polaris").setAddress("127.0.0.1:8091").setRegister(true);
registry = (PolarisRegistry) RegistryFactory.getRegistry(registryConfig);
registry.init();
}
Aggregations