Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
auto-test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xie.qin
auto-test
Commits
7da90d8c
Commit
7da90d8c
authored
Sep 27, 2021
by
xie.qin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove redundant requests which carried Headers.
parent
9f99ae70
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
41 deletions
+65
-41
OpenApiParser.java
...main/java/com/fuzamei/autotest/openapi/OpenApiParser.java
+6
-4
GlobalProperties.java
...ava/com/fuzamei/autotest/properties/GlobalProperties.java
+26
-1
SpecificProperties.java
...a/com/fuzamei/autotest/properties/SpecificProperties.java
+3
-3
application.properties
api/src/main/resources/application.properties
+2
-31
application.yml
api/src/main/resources/application.yml
+28
-2
No files found.
api/src/main/java/com/fuzamei/autotest/openapi/OpenApiParser.java
View file @
7da90d8c
...
@@ -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
);
}
}
...
...
api/src/main/java/com/fuzamei/autotest/properties/GlobalProperties.java
View file @
7da90d8c
...
@@ -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}"
)
...
...
api/src/main/java/com/fuzamei/autotest/properties/SpecificProperties.java
View file @
7da90d8c
...
@@ -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
;
}
}
api/src/main/resources/application.properties
View file @
7da90d8c
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
api/src/main/resources/application.yml
View file @
7da90d8c
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment