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
9244f825
Commit
9244f825
authored
Feb 10, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15823 from dreis2211
* pr/15823: Polish
parents
f6380ba6
1c50e7cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
MetricsRestTemplateCustomizerTests.java
...etrics/web/client/MetricsRestTemplateCustomizerTests.java
+4
-6
No files found.
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/client/MetricsRestTemplateCustomizerTests.java
View file @
9244f825
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -18,7 +18,6 @@ package org.springframework.boot.actuate.metrics.web.client;
...
@@ -18,7 +18,6 @@ package org.springframework.boot.actuate.metrics.web.client;
import
java.net.URI
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.net.URISyntaxException
;
import
java.util.stream.StreamSupport
;
import
io.micrometer.core.instrument.MeterRegistry
;
import
io.micrometer.core.instrument.MeterRegistry
;
import
io.micrometer.core.instrument.MockClock
;
import
io.micrometer.core.instrument.MockClock
;
...
@@ -70,10 +69,9 @@ public class MetricsRestTemplateCustomizerTests {
...
@@ -70,10 +69,9 @@ public class MetricsRestTemplateCustomizerTests {
.
andRespond
(
MockRestResponseCreators
.
withSuccess
(
"OK"
,
.
andRespond
(
MockRestResponseCreators
.
withSuccess
(
"OK"
,
MediaType
.
APPLICATION_JSON
));
MediaType
.
APPLICATION_JSON
));
String
result
=
this
.
restTemplate
.
getForObject
(
"/test/{id}"
,
String
.
class
,
123
);
String
result
=
this
.
restTemplate
.
getForObject
(
"/test/{id}"
,
String
.
class
,
123
);
assertThat
(
this
.
registry
.
find
(
"http.client.requests"
).
meters
())
assertThat
(
this
.
registry
.
find
(
"http.client.requests"
).
meters
()).
anySatisfy
(
.
anySatisfy
((
m
)
->
assertThat
(
(
m
)
->
assertThat
(
m
.
getId
().
getTags
().
stream
().
map
(
Tag:
:
getKey
))
StreamSupport
.
stream
(
m
.
getId
().
getTags
().
spliterator
(),
false
)
.
doesNotContain
(
"bucket"
));
.
map
(
Tag:
:
getKey
)).
doesNotContain
(
"bucket"
));
assertThat
(
this
.
registry
.
get
(
"http.client.requests"
)
assertThat
(
this
.
registry
.
get
(
"http.client.requests"
)
.
tags
(
"method"
,
"GET"
,
"uri"
,
"/test/{id}"
,
"status"
,
"200"
).
timer
()
.
tags
(
"method"
,
"GET"
,
"uri"
,
"/test/{id}"
,
"status"
,
"200"
).
timer
()
.
count
()).
isEqualTo
(
1
);
.
count
()).
isEqualTo
(
1
);
...
...
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