Search in sources :

Example 16 with DefaultServiceInstance

use of org.apache.dubbo.registry.client.DefaultServiceInstance in project dubbo by alibaba.

the class EurekaServiceDiscoveryTest method init.

@BeforeEach
public void init() throws Exception {
    serviceDiscovery = new EurekaServiceDiscovery();
    serviceDiscovery.initialize(registryURL);
    serviceInstance = new DefaultServiceInstance("test", "127.0.0.1", NetUtils.getAvailablePort());
    serviceDiscovery.register(serviceInstance);
}
Also used : DefaultServiceInstance(org.apache.dubbo.registry.client.DefaultServiceInstance) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

DefaultServiceInstance (org.apache.dubbo.registry.client.DefaultServiceInstance)16 Test (org.junit.jupiter.api.Test)8 ServiceInstance (org.apache.dubbo.registry.client.ServiceInstance)6 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 URL (org.apache.dubbo.common.URL)2 ServiceInstancesChangedEvent (org.apache.dubbo.registry.client.event.ServiceInstancesChangedEvent)2 Gson (com.google.gson.Gson)1 HashSet (java.util.HashSet)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 TreeSet (java.util.TreeSet)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 ProtocolConfig (org.apache.dubbo.config.ProtocolConfig)1 MetadataInfo (org.apache.dubbo.metadata.MetadataInfo)1 ServiceInstanceCustomizer (org.apache.dubbo.registry.client.ServiceInstanceCustomizer)1 ServiceInstancesChangedListener (org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener)1 ZookeeperInstance (org.apache.dubbo.registry.zookeeper.ZookeeperInstance)1