This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.0 by this push:
new a94a059 test: Add testcases for checking the process of exporting
Injvm protocol (#8395)
a94a059 is described below
commit a94a059376ad76dd4569e80dd8be0585b58b83d7
Author: Xiong, Pin <[email protected]>
AuthorDate: Tue Aug 3 07:23:51 2021 -0500
test: Add testcases for checking the process of exporting Injvm protocol
(#8395)
1. Verify the exported services through the custom ServiceListener
2. Verify the exported exporters through the custom ExporterListener
3. Verify the filter chain through the custom Filter
---
.../integration/single/injvm/InjvmFilter.java | 86 +++++++++
.../SingleRegistryCenterInjvmIntegrationTest.java | 201 +++++++++++++++++++++
.../injvm/SingleRegistryCenterInjvmService.java | 28 +++
.../SingleRegistryCenterInjvmServiceImpl.java | 31 ++++
.../single/listener/InjvmExporterListener.java | 124 +++++++++++++
.../single/listener/InjvmServiceListener.java | 60 ++++++
.../org.apache.dubbo.config.ServiceListener | 1 +
.../services/org.apache.dubbo.rpc.ExporterListener | 3 +-
.../META-INF/services/org.apache.dubbo.rpc.Filter | 3 +-
9 files changed, 535 insertions(+), 2 deletions(-)
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/InjvmFilter.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/InjvmFilter.java
new file mode 100644
index 0000000..cb45038
--- /dev/null
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/InjvmFilter.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.integration.single.injvm;
+
+import org.apache.dubbo.common.constants.CommonConstants;
+import org.apache.dubbo.common.extension.Activate;
+import org.apache.dubbo.rpc.Filter;
+import org.apache.dubbo.rpc.Invocation;
+import org.apache.dubbo.rpc.Invoker;
+import org.apache.dubbo.rpc.RpcException;
+import org.apache.dubbo.rpc.Result;
+
+@Activate(group = CommonConstants.PROVIDER, order = 10000)
+public class InjvmFilter implements Filter,Filter.Listener {
+
+ /**
+ * The filter is called or not
+ */
+ private boolean called = false;
+
+ /**
+ * There has error after invoked
+ */
+ private boolean error = false;
+
+ /**
+ * The returned result
+ */
+ private String response;
+ /**
+ * Always call invoker.invoke() in the implementation to hand over the
request to the next filter node.
+ *
+ * @param invoker
+ * @param invocation
+ */
+ @Override
+ public Result invoke(Invoker<?> invoker, Invocation invocation) throws
RpcException {
+ called = true;
+ return invoker.invoke(invocation);
+ }
+
+ @Override
+ public void onResponse(Result appResponse, Invoker<?> invoker, Invocation
invocation) {
+ response = appResponse.getValue().toString();
+ }
+
+ @Override
+ public void onError(Throwable t, Invoker<?> invoker, Invocation
invocation) {
+ error = true;
+ }
+
+ /**
+ * Returns if the filter has called.
+ */
+ public boolean hasCalled() {
+ return called;
+ }
+
+ /**
+ * Returns if there exists error.
+ */
+ public boolean hasError() {
+ return error;
+ }
+
+ /**
+ * Returns the response.
+ */
+ public String getResponse() {
+ return response;
+ }
+}
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmIntegrationTest.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmIntegrationTest.java
new file mode 100644
index 0000000..052f9dd
--- /dev/null
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmIntegrationTest.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.integration.single.injvm;
+
+import org.apache.dubbo.common.extension.ExtensionLoader;
+import org.apache.dubbo.config.ServiceConfig;
+import org.apache.dubbo.config.ReferenceConfig;
+import org.apache.dubbo.config.ServiceListener;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.bootstrap.DubboBootstrap;
+import org.apache.dubbo.integration.IntegrationTest;
+import org.apache.dubbo.integration.single.SingleZooKeeperServer;
+import org.apache.dubbo.integration.single.listener.InjvmExporterListener;
+import org.apache.dubbo.integration.single.listener.InjvmServiceListener;
+import org.apache.dubbo.rpc.ExporterListener;
+import org.apache.dubbo.rpc.Filter;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+import static org.apache.dubbo.rpc.Constants.SCOPE_LOCAL;
+
+/**
+ * The testcases are only for checking the process of exporting provider using
injvm protocol.
+ */
+public class SingleRegistryCenterInjvmIntegrationTest implements
IntegrationTest {
+
+ private static final Logger logger =
LoggerFactory.getLogger(SingleRegistryCenterInjvmIntegrationTest.class);
+
+ /**
+ * Define the provider application name.
+ */
+ private static String PROVIDER_APPLICATION_NAME =
"single-registry-center-provider-for-injvm-protocol";
+
+ /**
+ * The name for getting the specified instance, which is loaded using SPI.
+ */
+ private static String SPI_NAME = "singleConfigCenterInjvm";
+ /**
+ * Define the {@link ServiceConfig} instance.
+ */
+ private ServiceConfig<SingleRegistryCenterInjvmService> serviceConfig;
+
+ /**
+ * The listener to record exported services
+ */
+ private InjvmServiceListener serviceListener;
+
+ /**
+ * The listener to record exported exporters.
+ */
+ private InjvmExporterListener exporterListener;
+
+ /**
+ * The filter for checking filter chain.
+ */
+ private InjvmFilter filter;
+
+ @BeforeEach
+ public void setUp() throws Exception {
+ logger.info(getClass().getSimpleName() + " testcase is beginning...");
+ DubboBootstrap.reset();
+ //start zookeeper only once
+ logger.info(SingleZooKeeperServer.getZookeeperServerName() + " is
beginning to start...");
+ SingleZooKeeperServer.start();
+ logger.info(SingleZooKeeperServer.getZookeeperServerName() + " has
started.");
+
+ // initialize service config
+ serviceConfig = new ServiceConfig<SingleRegistryCenterInjvmService>();
+ serviceConfig.setInterface(SingleRegistryCenterInjvmService.class);
+ serviceConfig.setRef(new SingleRegistryCenterInjvmServiceImpl());
+ serviceConfig.setAsync(false);
+ serviceConfig.setScope(SCOPE_LOCAL);
+
+ // initailize bootstrap
+ DubboBootstrap.getInstance()
+ .application(new ApplicationConfig(PROVIDER_APPLICATION_NAME))
+ .registry(new RegistryConfig("N/A"))
+ .protocol(new ProtocolConfig("injvm"))
+ .service(serviceConfig);
+ }
+
+ /**
+ * Define {@link ServiceListener}, {@link ExporterListener} and {@link
Filter} for helping check.
+ * <p>Use SPI to load them before exporting.
+ * <p>After that, there are some checkpoints need to verify as follow:
+ * <ul>
+ * <li>There is nothing in ServiceListener or not</li>
+ * <li>There is nothing in ExporterListener or not</li>
+ * <li>ServiceConfig is exported or not</li>
+ * </ul>
+ */
+ private void beforeExport() {
+ // ---------------initialize--------------- //
+ serviceListener = (InjvmServiceListener)
ExtensionLoader.getExtensionLoader(ServiceListener.class).getExtension(SPI_NAME);
+ exporterListener = (InjvmExporterListener)
ExtensionLoader.getExtensionLoader(ExporterListener.class).getExtension(SPI_NAME);
+ filter = (InjvmFilter)
ExtensionLoader.getExtensionLoader(Filter.class).getExtension(SPI_NAME);
+
+ // ---------------checkpoints--------------- //
+ // There is nothing in ServiceListener
+ Assertions.assertTrue(serviceListener.getExportedServices().isEmpty());
+ // There is nothing in ExporterListener
+
Assertions.assertTrue(exporterListener.getExportedExporters().isEmpty());
+ // ServiceConfig isn't exported
+ Assertions.assertFalse(serviceConfig.isExported());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Test
+ @Override
+ public void integrate() {
+ beforeExport();
+ DubboBootstrap.getInstance().start();
+ afterExport();
+ ReferenceConfig<SingleRegistryCenterInjvmService> referenceConfig =
new ReferenceConfig<>();
+ referenceConfig.setInterface(SingleRegistryCenterInjvmService.class);
+ referenceConfig.setBootstrap(DubboBootstrap.getInstance());
+ referenceConfig.setScope(SCOPE_LOCAL);
+ referenceConfig.get().hello("Dubbo");
+ afterInvoke();
+ }
+
+ /**
+ * There are some checkpoints need to check after exported as follow:
+ * <ul>
+ * <li>The exported service is only one or not</li>
+ * <li>The exported service is SingleRegistryCenterInjvmService or
not</li>
+ * <li>The SingleRegistryCenterInjvmService is exported or not</li>
+ * <li>The exported exporter is only one or not</li>
+ * <li>The exported exporter contains InjvmFilter or not</li>
+ * </ul>
+ */
+ private void afterExport() {
+ // The exported service is only one
+
Assertions.assertEquals(serviceListener.getExportedServices().size(),1);
+ // The exported service is SingleRegistryCenterInjvmService
+
Assertions.assertEquals(serviceListener.getExportedServices().get(0).getInterfaceClass(),
+ SingleRegistryCenterInjvmService.class);
+ // The SingleRegistryCenterInjvmService is exported
+
Assertions.assertTrue(serviceListener.getExportedServices().get(0).isExported());
+ // The exported exporter is only one
+
Assertions.assertEquals(exporterListener.getExportedExporters().size(),1);
+ // The exported exporter contains InjvmFilter
+ Assertions.assertTrue(exporterListener.getFilters().contains(filter));
+ }
+
+ /**
+ * There are some checkpoints need to check after invoked as follow:
+ * <ul>
+ * <li>The InjvmFilter has called or not</li>
+ * <li>The InjvmFilter exists error after invoked</li>
+ * <li>The InjvmFilter's response is right or not</li>
+ * </ul>
+ */
+ private void afterInvoke(){
+ // The InjvmFilter has called
+ Assertions.assertTrue(filter.hasCalled());
+ // The InjvmFilter doesn't exist error
+ Assertions.assertFalse(filter.hasError());
+ // Check the InjvmFilter's response
+ Assertions.assertEquals("Hello Dubbo",filter.getResponse());
+ }
+
+ @AfterEach
+ public void tearDown() throws IOException {
+ DubboBootstrap.reset();
+ PROVIDER_APPLICATION_NAME = null;
+ serviceConfig = null;
+ // The exported service has been unexported
+ Assertions.assertTrue(serviceListener.getExportedServices().isEmpty());
+ serviceListener = null;
+ logger.info(getClass().getSimpleName() + " testcase is ending...");
+ // destroy zookeeper only once
+ logger.info(SingleZooKeeperServer.getZookeeperServerName() + " is
beginning to shutdown...");
+ SingleZooKeeperServer.shutdown();
+ logger.info(SingleZooKeeperServer.getZookeeperServerName() + " has
shutdown.");
+ }
+}
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmService.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmService.java
new file mode 100644
index 0000000..916ca69
--- /dev/null
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.integration.single.injvm;
+
+/**
+ * This interface is used to check if the exported injvm protocol works well
or not.
+ */
+public interface SingleRegistryCenterInjvmService {
+
+ /**
+ * The simple method for testing.
+ */
+ String hello(String name);
+}
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmServiceImpl.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmServiceImpl.java
new file mode 100644
index 0000000..c1f6bda
--- /dev/null
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/injvm/SingleRegistryCenterInjvmServiceImpl.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.integration.single.injvm;
+
+/**
+ * The simple implementation for {@link SingleRegistryCenterInjvmService}
+ */
+public class SingleRegistryCenterInjvmServiceImpl implements
SingleRegistryCenterInjvmService {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String hello(String name) {
+ return "Hello " + name;
+ }
+}
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/listener/InjvmExporterListener.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/listener/InjvmExporterListener.java
new file mode 100644
index 0000000..6f3ace1
--- /dev/null
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/listener/InjvmExporterListener.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.integration.single.listener;
+
+import org.apache.dubbo.common.constants.CommonConstants;
+import org.apache.dubbo.common.extension.Activate;
+import
org.apache.dubbo.integration.single.injvm.SingleRegistryCenterInjvmService;
+import org.apache.dubbo.rpc.Exporter;
+import org.apache.dubbo.rpc.ExporterListener;
+import org.apache.dubbo.rpc.Filter;
+import org.apache.dubbo.rpc.RpcException;
+import org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder;
+import org.apache.dubbo.rpc.listener.ListenerExporterWrapper;
+
+import java.lang.reflect.Field;
+import java.util.*;
+
+@Activate(group = CommonConstants.PROVIDER, order = 1000)
+public class InjvmExporterListener implements ExporterListener {
+
+ /**
+ * Exported exporters.
+ */
+ private List<Exporter<?>> exportedExporters = new ArrayList();
+
+ /**
+ * Resolve all filters
+ */
+ private Set<Filter> filters = new HashSet<>();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void exported(Exporter<?> exporter) throws RpcException {
+ ListenerExporterWrapper listenerExporterWrapper =
(ListenerExporterWrapper) exporter;
+ FilterChainBuilder.FilterChainNode filterChainNode =
(FilterChainBuilder.FilterChainNode) listenerExporterWrapper.getInvoker();
+ if (filterChainNode == null ||
+ filterChainNode.getInterface() !=
SingleRegistryCenterInjvmService.class) {
+ return;
+ }
+ exportedExporters.add(exporter);
+ do {
+ Filter filter = this.getFilter(filterChainNode);
+ if (filter != null) {
+ filters.add(filter);
+ }
+ filterChainNode = this.getNextNode(filterChainNode);
+ } while (filterChainNode != null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void unexported(Exporter<?> exporter) {
+ exportedExporters.remove(exporter);
+ }
+
+ /**
+ * Returns the exported exporters.
+ */
+ public List<Exporter<?>> getExportedExporters() {
+ return Collections.unmodifiableList(exportedExporters);
+ }
+
+ /**
+ * Returns all filters
+ */
+ public Set<Filter> getFilters() {
+ return Collections.unmodifiableSet(filters);
+ }
+
+ /**
+ * Use reflection to obtain {@link Filter}
+ */
+ private Filter getFilter(FilterChainBuilder.FilterChainNode
filterChainNode) {
+ if (filterChainNode != null) {
+ Field field = null;
+ try {
+ field = filterChainNode.getClass().getDeclaredField("filter");
+ field.setAccessible(true);
+ return (Filter) field.get(filterChainNode);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ // ignore
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Use reflection to obtain {@link FilterChainBuilder.FilterChainNode}
+ */
+ private FilterChainBuilder.FilterChainNode
getNextNode(FilterChainBuilder.FilterChainNode filterChainNode) {
+ if (filterChainNode != null) {
+ Field field = null;
+ try {
+ field =
filterChainNode.getClass().getDeclaredField("nextNode");
+ field.setAccessible(true);
+ Object object = field.get(filterChainNode);
+ if (object instanceof FilterChainBuilder.FilterChainNode) {
+ return (FilterChainBuilder.FilterChainNode) object;
+ }
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ // ignore
+ }
+ }
+ return null;
+ }
+}
diff --git
a/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/listener/InjvmServiceListener.java
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/listener/InjvmServiceListener.java
new file mode 100644
index 0000000..0764b78
--- /dev/null
+++
b/dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/integration/single/listener/InjvmServiceListener.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.integration.single.listener;
+
+import org.apache.dubbo.config.ServiceConfig;
+import org.apache.dubbo.config.ServiceListener;
+import
org.apache.dubbo.integration.single.injvm.SingleRegistryCenterInjvmService;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This implementation of {@link ServiceListener} is to record exported
services with injvm protocol.
+ */
+public class InjvmServiceListener implements ServiceListener {
+
+ private List<ServiceConfig> exportedServices = new ArrayList<>(2);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void exported(ServiceConfig sc) {
+ //All exported services will be added
+ if (sc.getInterfaceClass() == SingleRegistryCenterInjvmService.class) {
+ exportedServices.add(sc);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void unexported(ServiceConfig sc) {
+ //remove the exported services.
+ exportedServices.remove(sc);
+ }
+
+ /**
+ * Return all exported services.
+ */
+ public List<ServiceConfig> getExportedServices() {
+ return Collections.unmodifiableList(exportedServices);
+ }
+}
diff --git
a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.config.ServiceListener
b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.config.ServiceListener
index 3ba216b..aac2dca 100644
---
a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.config.ServiceListener
+++
b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.config.ServiceListener
@@ -1,2 +1,3 @@
mock=org.apache.dubbo.config.mock.MockServiceListener
exported=org.apache.dubbo.integration.single.listener.ExportedServiceListener
+singleConfigCenterInjvm=org.apache.dubbo.integration.single.listener.InjvmServiceListener
diff --git
a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
index f9c818d..1b9f72d 100644
---
a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
+++
b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.ExporterListener
@@ -15,4 +15,5 @@
# limitations under the License.
#
-mockexporterlistener=org.apache.dubbo.config.mock.MockExporterListener
\ No newline at end of file
+mockexporterlistener=org.apache.dubbo.config.mock.MockExporterListener
+singleConfigCenterInjvm=org.apache.dubbo.integration.single.listener.InjvmExporterListener
diff --git
a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
index 1938f96..ea35520 100644
---
a/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
+++
b/dubbo-config/dubbo-config-api/src/test/resources/META-INF/services/org.apache.dubbo.rpc.Filter
@@ -1 +1,2 @@
-mockfilter=org.apache.dubbo.config.mock.MockFilter
\ No newline at end of file
+mockfilter=org.apache.dubbo.config.mock.MockFilter
+singleConfigCenterInjvm=org.apache.dubbo.integration.single.injvm.InjvmFilter