fix(接口测试): 使用Dubbo常量
This commit is contained in:
parent
7365355d8e
commit
fc278e6bf7
|
@ -27,6 +27,7 @@ import io.metersphere.service.FileService;
|
||||||
import io.metersphere.service.ScheduleService;
|
import io.metersphere.service.ScheduleService;
|
||||||
import io.metersphere.track.service.TestCaseService;
|
import io.metersphere.track.service.TestCaseService;
|
||||||
import org.apache.dubbo.common.URL;
|
import org.apache.dubbo.common.URL;
|
||||||
|
import org.apache.dubbo.common.constants.CommonConstants;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
@ -303,7 +304,7 @@ public class APITestService {
|
||||||
provider.setServiceInterface(p);
|
provider.setServiceInterface(p);
|
||||||
Map<String, URL> services = providerService.findByService(p);
|
Map<String, URL> services = providerService.findByService(p);
|
||||||
if (services != null && !services.isEmpty()) {
|
if (services != null && !services.isEmpty()) {
|
||||||
String[] methods = services.values().stream().findFirst().get().getParameter("methods").split(",");
|
String[] methods = services.values().stream().findFirst().get().getParameter(CommonConstants.METHODS_KEY).split(",");
|
||||||
provider.setMethods(Arrays.asList(methods));
|
provider.setMethods(Arrays.asList(methods));
|
||||||
} else {
|
} else {
|
||||||
provider.setMethods(new ArrayList<>());
|
provider.setMethods(new ArrayList<>());
|
||||||
|
|
Loading…
Reference in New Issue