Skip to content

Commit

Permalink
Merge pull request spring-projects#15823 from dreis2211
Browse files Browse the repository at this point in the history
* pr/15823:
  Polish
  • Loading branch information
snicoll committed Feb 10, 2019
2 parents f6380ba + 1c50e7c commit 9244f82
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,6 @@

import java.net.URI;
import java.net.URISyntaxException;
import java.util.stream.StreamSupport;

import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.MockClock;
Expand Down Expand Up @@ -70,10 +69,9 @@ public void interceptRestTemplate() {
.andRespond(MockRestResponseCreators.withSuccess("OK",
MediaType.APPLICATION_JSON));
String result = this.restTemplate.getForObject("/test/{id}", String.class, 123);
assertThat(this.registry.find("http.client.requests").meters())
.anySatisfy((m) -> assertThat(
StreamSupport.stream(m.getId().getTags().spliterator(), false)
.map(Tag::getKey)).doesNotContain("bucket"));
assertThat(this.registry.find("http.client.requests").meters()).anySatisfy(
(m) -> assertThat(m.getId().getTags().stream().map(Tag::getKey))
.doesNotContain("bucket"));
assertThat(this.registry.get("http.client.requests")
.tags("method", "GET", "uri", "/test/{id}", "status", "200").timer()
.count()).isEqualTo(1);
Expand Down

0 comments on commit 9244f82

Please sign in to comment.