fix(接口测试): 修复dubbo和sql请求不能添加控制器的bug

This commit is contained in:
q4speed 2020-09-23 16:49:10 +08:00
parent d7a9d7df1a
commit b34e279269
4 changed files with 11 additions and 6 deletions

View File

@ -3,9 +3,11 @@ package io.metersphere.api.dto.scenario.request;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import io.metersphere.api.dto.scenario.assertions.Assertions;
import io.metersphere.api.dto.scenario.controller.IfController;
import io.metersphere.api.dto.scenario.extract.Extract;
import io.metersphere.api.dto.scenario.processor.JSR223PostProcessor;
import io.metersphere.api.dto.scenario.processor.JSR223PreProcessor;
import io.metersphere.api.dto.scenario.timer.ConstantTimer;
import lombok.Data;
@Data
@ -41,4 +43,8 @@ public class SqlRequest implements Request {
private String resultVariable;
@JSONField(ordinal = 14)
private String variableNames;
@JSONField(ordinal = 15)
private IfController controller;
@JSONField(ordinal = 16)
private ConstantTimer timer;
}

@ -1 +1 @@
Subproject commit 141ee64787b4a28ef108c5fa4dde90446de01887
Subproject commit cf6b06526324326a563d933e07118fac014a63b4

View File

@ -306,8 +306,8 @@ export class Request extends BaseConfig {
super();
this.type = type;
options.id = options.id || uuid();
options.timer = new ConstantTimer(options.timer);
options.controller = new IfController(options.controller);
this.timer = options.timer = new ConstantTimer(options.timer);
this.controller = options.controller = new IfController(options.controller);
}
showType() {
@ -478,7 +478,7 @@ export class DubboRequest extends Request {
export class SqlRequest extends Request {
constructor(options = {}) {
super(RequestFactory.TYPES.SQL);
super(RequestFactory.TYPES.SQL, options);
this.id = options.id || uuid();
this.name = options.name;
this.useEnvironment = options.useEnvironment;
@ -496,7 +496,6 @@ export class SqlRequest extends Request {
this.jsr223PostProcessor = new JSR223Processor(options.jsr223PostProcessor);
this.sets({args: KeyValue, attachmentArgs: KeyValue}, options);
}
isValid() {

@ -1 +1 @@
Subproject commit 06d935cd1d22ab36f09763745c2aff8ad3fb08c1
Subproject commit 17422063acb5936497660a35675e88eba997e767