fix(接口测试): 修复场景的Dubbo配置有默认值

This commit is contained in:
q4speed 2020-07-22 11:02:26 +08:00
parent 67503e6d37
commit be21158f60
1 changed files with 13 additions and 1 deletions

View File

@ -194,6 +194,18 @@ class DubboConfig extends BaseConfig {
super();
this.configCenter = new ConfigCenter(options.configCenter)
this.registryCenter = new RegistryCenter(options.registryCenter)
if (options.consumerAndService === undefined) {
options.consumerAndService = {
timeout: undefined,
version: undefined,
retries: undefined,
cluster: undefined,
group: undefined,
connections: undefined,
async: undefined,
loadBalance: undefined
}
}
this.consumerAndService = new ConsumerAndService(options.consumerAndService)
}
}
@ -259,7 +271,7 @@ export class HttpRequest extends Request {
}
isValid(environmentId) {
if (this.useEnvironment){
if (this.useEnvironment) {
if (!environmentId) {
return {
isValid: false,