You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/27 03:15:20 UTC

[GitHub] [dubbo] pinxiong commented on a change in pull request #8600: Adjust the scope of the spi extension

pinxiong commented on a change in pull request #8600:
URL: https://github.com/apache/dubbo/pull/8600#discussion_r697121312



##########
File path: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/multiple/servicediscoveryregistry/MultipleRegistryCenterServiceDiscoveryRegistryIntegrationTest.java
##########
@@ -104,12 +106,16 @@ public void setUp() throws Exception {
         serviceConfig.setRef(new MultipleRegistryCenterServiceDiscoveryRegistryServiceImpl());
         serviceConfig.setAsync(false);
 
-        // initailize bootstrap
+        // initialize bootstrap
         for (RegistryCenter.Instance instance : registryCenter.getRegistryCenterInstance()) {
-            DubboBootstrap.getInstance().registry(new RegistryConfig(String.format("%s://%s:%s",
+            RegistryConfig registryConfig = new RegistryConfig(String.format("%s://%s:%s",
                 instance.getType(),
                 instance.getHostname(),
-                instance.getPort())));
+                instance.getPort()));
+            Map<String, String> parameters = new HashMap<>();
+            parameters.put("registry.listeners", "multipleConfigCenterServiceDiscoveryRegistry");

Review comment:
       It's better use the constant named `SPI_NAME` instead

##########
File path: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/exportprovider/SingleRegistryCenterExportProviderIntegrationTest.java
##########
@@ -110,16 +112,20 @@ public void setUp() throws Exception {
         serviceConfig.setRef(new SingleRegistryCenterExportProviderServiceImpl());
         serviceConfig.setAsync(false);
 
-        // initailize bootstrap
+        // initialize bootstrap
         DubboBootstrap.getInstance()
             .application(new ApplicationConfig(PROVIDER_APPLICATION_NAME))
             .protocol(new ProtocolConfig(PROTOCOL_NAME, PROTOCOL_PORT))
             .service(serviceConfig);
         RegistryCenter.Instance instance = registryCenter.getRegistryCenterInstance().get(0);
+
         RegistryConfig registryConfig = new RegistryConfig(String.format("%s://%s:%s",
             instance.getType(),
             instance.getHostname(),
             instance.getPort()));
+        Map<String, String> parameters = new HashMap<>();
+        parameters.put("registry.protocol.listener", "singleConfigCenterExportProvider");

Review comment:
       see above

##########
File path: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/exportprovider/SingleRegistryCenterExportProviderRegistryProtocolListener.java
##########
@@ -27,7 +27,7 @@
 /**
  * The {@link RegistryProtocolListener} for {@link SingleRegistryCenterExportProviderService}
  */
-@Activate(order = 100)
+@Activate(order = 100, value = "singleConfigCenterExportProvider")

Review comment:
       see above

##########
File path: dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/multiple/servicediscoveryregistry/MultipleRegistryCenterServiceDiscoveryRegistryRegistryServiceListener.java
##########
@@ -25,15 +25,15 @@
 import org.apache.dubbo.registry.client.ServiceDiscoveryRegistry;
 import org.apache.dubbo.registry.client.metadata.store.InMemoryWritableMetadataService;
 
-@Activate
+@Activate(value = "multipleConfigCenterServiceDiscoveryRegistry")

Review comment:
       see above




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org