Commit 2c3b455b authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '2.0.x'

parents 575070a8 8470d649
...@@ -46,15 +46,18 @@ public class EndpointIdTimeToLivePropertyFunctionTests { ...@@ -46,15 +46,18 @@ public class EndpointIdTimeToLivePropertyFunctionTests {
@Test @Test
public void userConfiguration() { public void userConfiguration() {
this.environment.setProperty( this.environment.setProperty("management.endpoint.test.cache.time-to-live",
"management.endpoint.another-test.cache.time-to-live", "500"); "500");
Long result = this.timeToLive.apply(EndpointId.of("anotherTest")); Long result = this.timeToLive.apply(EndpointId.of("test"));
assertThat(result).isEqualTo(500L); assertThat(result).isEqualTo(500L);
} }
@Test @Test
public void mixedCaseUserConfiguration() { public void mixedCaseUserConfiguration() {
this.environment.setProperty(
"management.endpoint.another-test.cache.time-to-live", "500");
Long result = this.timeToLive.apply(EndpointId.of("anotherTest"));
assertThat(result).isEqualTo(500L);
} }
} }
...@@ -117,8 +117,8 @@ public final class EndpointId { ...@@ -117,8 +117,8 @@ public final class EndpointId {
} }
/** /**
* Factory method to create a new {@link EndpointId} from a property value. Is more * Factory method to create a new {@link EndpointId} from a property value. More
* lenient that {@link #of(String)} to allow for common "relaxed" property variants. * lenient than {@link #of(String)} to allow for common "relaxed" property variants.
* @param value the property value to convert * @param value the property value to convert
* @return an {@link EndpointId} instance * @return an {@link EndpointId} instance
*/ */
......
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