fix(接口定义): DUBBO执行缺陷修复

This commit is contained in:
fit2-zhao 2021-01-06 14:52:32 +08:00
parent cc3006b9a1
commit b2e619e355
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package io.metersphere.api.jmeter;
import io.metersphere.api.dto.scenario.request.RequestType;
import io.metersphere.api.service.*;
import io.metersphere.base.domain.ApiScenarioReport;
import io.metersphere.base.domain.ApiTestReport;
@ -339,7 +340,11 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
String start = "RPC Protocol: ";
String end = "://";
if (StringUtils.contains(body, start)) {
return StringUtils.substringBetween(body, start, end).toUpperCase();
String protocol = StringUtils.substringBetween(body, start, end);
if (StringUtils.isNotEmpty(protocol)) {
return protocol.toUpperCase();
}
return RequestType.DUBBO;
} else {
// Http Method
String method = StringUtils.substringBefore(body, " ");