Commit 7da90d8c authored by xie.qin's avatar xie.qin

remove redundant requests which carried Headers.

parent 9f99ae70
...@@ -601,10 +601,12 @@ public class OpenApiParser { ...@@ -601,10 +601,12 @@ public class OpenApiParser {
//publish message and wait subscriber(e.g. rest-assure) to send out request //publish message and wait subscriber(e.g. rest-assure) to send out request
RestfulMessageEvent restfulMessageEvent = new RestfulMessageEvent(this); RestfulMessageEvent restfulMessageEvent = new RestfulMessageEvent(this);
restfulMessageEvent.setMsg(restfulMsgWithHeaders); if (globalProperties.getWithoutHeaders()) {
applicationContext.publishEvent(restfulMessageEvent); restfulMessageEvent.setMsg(restfulMsgWithoutHeaders);
}
restfulMessageEvent.setMsg(restfulMsgWithoutHeaders); else {
restfulMessageEvent.setMsg(restfulMsgWithHeaders);
}
applicationContext.publishEvent(restfulMessageEvent); applicationContext.publishEvent(restfulMessageEvent);
} }
......
...@@ -10,23 +10,48 @@ import org.springframework.stereotype.Component; ...@@ -10,23 +10,48 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
@Component @Component
@ConfigurationProperties(prefix = "global.test")
@PropertySource(value = "classpath:application.yml", encoding = "UTF-8") @PropertySource(value = "classpath:application.yml", encoding = "UTF-8")
@Setter @Setter
@Getter @Getter
public class GlobalProperties { public class GlobalProperties {
@Value("${test.global.release}")
private String release; private String release;
@Value("${test.api.intmin}")
private Integer int32max; private Integer int32max;
@Value("${test.api.withoutHeaders}")
private Boolean withoutHeaders;
@Value("${test.api.int64max}")
private String int64max; private String int64max;
@Value("${test.api.dftstring}")
private String dftstring; private String dftstring;
@Value("${test.api.dftboolean}")
private Boolean dftboolean; private Boolean dftboolean;
@Value("${test.api.dftnumber}")
private BigDecimal dftnumber; private BigDecimal dftnumber;
@Value("${test.api.dftuserid}")
private Long dftuserid; private Long dftuserid;
@Value("${test.api.dftusername}")
private String dftusername; private String dftusername;
@Value("${test.api.intmin}")
private Integer intmin; private Integer intmin;
@Value("${test.api.latestchain33version}")
private String latestchain33version; private String latestchain33version;
@Value("${test.api.datacollectionpath}")
private String datacollectionpath; private String datacollectionpath;
@Value("${test.api.testdatapathintesting}")
private String testdatapathintesting; private String testdatapathintesting;
@Value("${server.port}") @Value("${server.port}")
......
...@@ -15,12 +15,12 @@ import org.springframework.stereotype.Component; ...@@ -15,12 +15,12 @@ import org.springframework.stereotype.Component;
@Getter @Getter
public class SpecificProperties { public class SpecificProperties {
@Value("${restassured.connecttimeout}") @Value("${test.restassured.connecttimeout}")
private Integer restConnTimeout; private Integer restConnTimeout;
@Value("${restassured.requesttimeout}") @Value("${test.restassured.requesttimeout}")
private Integer restReqTimeout; private Integer restReqTimeout;
@Value("${restassured.sockettimeout}") @Value("${test.restassured.sockettimeout}")
private Integer restSocketTimeout; private Integer restSocketTimeout;
} }
global.test.release=v2.3.0
global.test.intmin=0
global.test.int32max=2147483647
global.test.int64max=9223372036854775807
global.test.dftstring=1J7mdg5rbQyUHENYdx39WVWK7fsLpEoXZy1J7mdg5rbQyUHENYdx39WVWK7fsLpE
global.test.dftboolean=false
global.test.dftnumber=9999999999.99
global.test.dftuserid=87654321
global.test.dftusername=automation
global.test.latestchain33version=chain33_v1.6.6
global.test.datacollectionpath=resources/testingdata/
server.port=8080
server.http2.enabled=true
server.ssl.enabled=false
server.ssl.key-store-type=PKCS12
server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store-password=123456
server.ssl.key-alias=netty-reactor
logging.level.root=INFO logging.level.root=INFO
logging.level.org.springframework=ERROR logging.level.org.springframework=ERROR
logging.level.com.fuzamei.autotest=DEBUG logging.level.com.fuzamei.autotest=DEBUG
...@@ -26,13 +6,4 @@ spring.jackson.default-property-inclusion=non_null ...@@ -26,13 +6,4 @@ spring.jackson.default-property-inclusion=non_null
spring.application.name=auto-test spring.application.name=auto-test
mybatis.type-aliases-package=com.fuzamei.autotest.testdata.entity mybatis.type-aliases-package=com.fuzamei.autotest.testdata.entity
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
\ No newline at end of file
restassured.connecttimeout=10000
restassured.requesttimeout=10000
restassured.sockettimeout=10000
okhttp3.http2.maxtotalconnections=10
okhttp3.http2.connectionkeepaliveduration=10
okhttp3.http2.calltimeout=10
okhttp3.http2.connectiontimeout=10
\ No newline at end of file
server:
port: 8080
http2:
enabled: true
ssl:
enabled: false
key-store-type: PKCS12
key-store: classpath:keystore.p12
key-store-password: 123456
key-alias: netty-reactor
grpc: grpc:
client: client:
chain33: chain33:
...@@ -7,6 +18,7 @@ grpc: ...@@ -7,6 +18,7 @@ grpc:
negotiationType: plaintext negotiationType: plaintext
server: server:
port: 8802 port: 8802
service: service:
combinedDeployment: true combinedDeployment: true
backend: backend:
...@@ -146,9 +158,11 @@ serviceMock: ...@@ -146,9 +158,11 @@ serviceMock:
chain33: chain33:
responsePath: ${serviceMock.pathPrefix}/chain33.json responsePath: ${serviceMock.pathPrefix}/chain33.json
global: test:
test: global:
release: v2.3.0 release: v2.3.0
api:
withoutHeaders: true
intmin: 0 intmin: 0
int32max: 2147483647 int32max: 2147483647
int64max: 9223372036854775807 int64max: 9223372036854775807
...@@ -159,3 +173,15 @@ global: ...@@ -159,3 +173,15 @@ global:
dftusername: automation dftusername: automation
latestchain33version: chain33_v1.6.6 latestchain33version: chain33_v1.6.6
datacollectionpath: resources/testingdata/ datacollectionpath: resources/testingdata/
testdatapathintesting: /
restassured:
connecttimeout: 10000
requesttimeout: 10000
sockettimeout: 10000
okhttp3:
http2:
maxtotalconnections: 10
connectionkeepaliveduration: 10
calltimeout: 10
connectiontimeout: 10
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment