Skip to content

Commit 8470d64

Browse files
izeyesnicoll
authored andcommitted
1 parent 6ed1f7c commit 8470d64

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointIdTimeToLivePropertyFunctionTests.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,18 @@ public void defaultConfiguration() {
4646

4747
@Test
4848
public void userConfiguration() {
49-
this.environment.setProperty(
50-
"management.endpoint.another-test.cache.time-to-live", "500");
51-
Long result = this.timeToLive.apply(EndpointId.of("anotherTest"));
49+
this.environment.setProperty("management.endpoint.test.cache.time-to-live",
50+
"500");
51+
Long result = this.timeToLive.apply(EndpointId.of("test"));
5252
assertThat(result).isEqualTo(500L);
5353
}
5454

5555
@Test
5656
public void mixedCaseUserConfiguration() {
57-
57+
this.environment.setProperty(
58+
"management.endpoint.another-test.cache.time-to-live", "500");
59+
Long result = this.timeToLive.apply(EndpointId.of("anotherTest"));
60+
assertThat(result).isEqualTo(500L);
5861
}
5962

6063
}

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/EndpointId.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ public static EndpointId of(String value) {
103103
}
104104

105105
/**
106-
* Factory method to create a new {@link EndpointId} from a property value. Is more
107-
* lenient that {@link #of(String)} to allow for common "relaxed" property variants.
106+
* Factory method to create a new {@link EndpointId} from a property value. More
107+
* lenient than {@link #of(String)} to allow for common "relaxed" property variants.
108108
* @param value the property value to convert
109109
* @return an {@link EndpointId} instance
110110
*/

0 commit comments

Comments
 (0)