Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
fa8a09d4
Commit
fa8a09d4
authored
Mar 05, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.2.x'
Closes gh-20395
parents
72a9eb8e
5009b5e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
MetricsWebFilterTests.java
...te/metrics/web/reactive/server/MetricsWebFilterTests.java
+3
-3
WebFluxTagsTests.java
...actuate/metrics/web/reactive/server/WebFluxTagsTests.java
+3
-3
AbstractReactiveWebServerFactoryTests.java
...eactive/server/AbstractReactiveWebServerFactoryTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java
View file @
fa8a09d4
...
...
@@ -69,7 +69,7 @@ class MetricsWebFilterTests {
MockServerWebExchange
exchange
=
createExchange
(
"/projects/spring-boot"
,
"/projects/{project}"
);
this
.
webFilter
.
filter
(
exchange
,
(
serverWebExchange
)
->
Mono
.
error
(
new
IllegalStateException
(
"test error"
)))
.
onErrorResume
((
t
)
->
{
exchange
.
getResponse
().
set
StatusCodeValu
e
(
500
);
exchange
.
getResponse
().
set
RawStatusCod
e
(
500
);
return
exchange
.
getResponse
().
setComplete
();
}).
block
(
Duration
.
ofSeconds
(
30
));
assertMetricsContainsTag
(
"uri"
,
"/projects/{project}"
);
...
...
@@ -84,7 +84,7 @@ class MetricsWebFilterTests {
MockServerWebExchange
exchange
=
createExchange
(
"/projects/spring-boot"
,
"/projects/{project}"
);
this
.
webFilter
.
filter
(
exchange
,
(
serverWebExchange
)
->
Mono
.
error
(
anonymous
)).
onErrorResume
((
t
)
->
{
exchange
.
getResponse
().
set
StatusCodeValu
e
(
500
);
exchange
.
getResponse
().
set
RawStatusCod
e
(
500
);
return
exchange
.
getResponse
().
setComplete
();
}).
block
(
Duration
.
ofSeconds
(
30
));
assertMetricsContainsTag
(
"uri"
,
"/projects/{project}"
);
...
...
@@ -96,7 +96,7 @@ class MetricsWebFilterTests {
void
filterAddsTagsToRegistryForExceptionsAndCommittedResponse
()
{
MockServerWebExchange
exchange
=
createExchange
(
"/projects/spring-boot"
,
"/projects/{project}"
);
this
.
webFilter
.
filter
(
exchange
,
(
serverWebExchange
)
->
{
exchange
.
getResponse
().
set
StatusCodeValu
e
(
500
);
exchange
.
getResponse
().
set
RawStatusCod
e
(
500
);
return
exchange
.
getResponse
().
setComplete
().
then
(
Mono
.
error
(
new
IllegalStateException
(
"test error"
)));
}).
onErrorResume
((
t
)
->
Mono
.
empty
()).
block
(
Duration
.
ofSeconds
(
30
));
assertMetricsContainsTag
(
"uri"
,
"/projects/{project}"
);
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTagsTests.java
View file @
fa8a09d4
...
...
@@ -75,7 +75,7 @@ class WebFluxTagsTests {
@Test
void
uriTagToleratesCustomResponseStatus
()
{
this
.
exchange
.
getResponse
().
set
StatusCodeValu
e
(
601
);
this
.
exchange
.
getResponse
().
set
RawStatusCod
e
(
601
);
Tag
tag
=
WebFluxTags
.
uri
(
this
.
exchange
);
assertThat
(
tag
.
getValue
()).
isEqualTo
(
"root"
);
}
...
...
@@ -169,14 +169,14 @@ class WebFluxTagsTests {
@Test
void
outcomeTagIsClientErrorWhenResponseIsNonStandardInClientSeries
()
{
this
.
exchange
.
getResponse
().
set
StatusCodeValu
e
(
490
);
this
.
exchange
.
getResponse
().
set
RawStatusCod
e
(
490
);
Tag
tag
=
WebFluxTags
.
outcome
(
this
.
exchange
);
assertThat
(
tag
.
getValue
()).
isEqualTo
(
"CLIENT_ERROR"
);
}
@Test
void
outcomeTagIsUnknownWhenResponseStatusIsInUnknownSeries
()
{
this
.
exchange
.
getResponse
().
set
StatusCodeValu
e
(
701
);
this
.
exchange
.
getResponse
().
set
RawStatusCod
e
(
701
);
Tag
tag
=
WebFluxTags
.
outcome
(
this
.
exchange
);
assertThat
(
tag
.
getValue
()).
isEqualTo
(
"UNKNOWN"
);
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java
View file @
fa8a09d4
...
...
@@ -149,7 +149,7 @@ public abstract class AbstractReactiveWebServerFactoryTests {
.
clientConnector
(
connector
).
build
();
Mono
<
String
>
result
=
client
.
post
().
uri
(
"/test"
).
contentType
(
MediaType
.
TEXT_PLAIN
)
.
body
(
BodyInserters
.
from
Object
(
"Hello World"
)).
exchange
()
.
body
(
BodyInserters
.
from
Value
(
"Hello World"
)).
exchange
()
.
flatMap
((
response
)
->
response
.
bodyToMono
(
String
.
class
));
StepVerifier
.
setDefaultTimeout
(
Duration
.
ofSeconds
(
30
));
...
...
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