apache / dubbo

@@ -156,14 +156,18 @@
Loading
156 156
    }
157 157
158 158
    @SuppressWarnings("unchecked")
159 -
    private Invoker<T> getInvoker(String mockService) {
159 +
    private Invoker<T> getInvoker(String mock) {
160 +
        Class<T> serviceType = (Class<T>) ReflectUtils.forName(url.getServiceInterface());
161 +
162 +
        final boolean isDefault = ConfigUtils.isDefault(mock);
163 +
        // convert to actual mock service name
164 +
        String mockService = isDefault ? serviceType.getName() + "Mock" : mock;
160 165
        Invoker<T> invoker = (Invoker<T>) MOCK_MAP.get(mockService);
161 166
        if (invoker != null) {
162 167
            return invoker;
163 168
        }
164 169
165 -
        Class<T> serviceType = (Class<T>) ReflectUtils.forName(url.getServiceInterface());
166 -
        T mockObject = (T) getMockObject(mockService, serviceType);
170 +
        T mockObject = (T) getMockObject(mock, serviceType);
167 171
        invoker = PROXY_FACTORY.getInvoker(mockObject, serviceType, url);
168 172
        if (MOCK_MAP.size() < 10000) {
169 173
            MOCK_MAP.put(mockService, invoker);
Files Complexity Coverage
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster 0 60.81%
dubbo-common/src/main/java/org/apache/dubbo 0 73.94%
dubbo-compatible/src/main/java/com/alibaba/dubbo 8.29% 8.46%
dubbo-config 0 74.49%
dubbo-configcenter 20.41% 18.43%
dubbo-container 33.33% 16.42%
dubbo-filter 0 67.08%
dubbo-metadata 10.77% 50.24%
dubbo-monitor 53.85% 72.25%
dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos 0 67.15%
dubbo-registry 23.60% 46.86%
dubbo-remoting 33.12% 51.12%
dubbo-rpc 22.70% 59.94%
dubbo-serialization 79.41% 68.72%
dubbo-spring-boot 45.68% 58.68%
Project Totals (1097 files) 24.83% 61.05%
1
coverage:
2
  status:
3
    # pull-requests only
4
    patch:
5
      default:
6
        threshold: 0.1%
7
ignore:
8
  - "dubbo-demo/.*"
9
  - "dubbo-common/src/main/java/org/apache/dubbo/common/json/*.java" #  internal JSON impl is deprecate, ignore test coverage for them
10
  - "dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/AnnotationBean.java" # Deprecated
11
  - "dubbo-rpc/dubbo-rpc-thrift/.*"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading