Skip to content

Commit ddf0918

Browse files
authored
Update AuditEventsEndpointDocumentationTests.java
Use fixed timestamp in test to make documentation reproducible concerns: #45795 Signed-off-by: Todor Dinev <[email protected]>
1 parent 8b85f92 commit ddf0918

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/audit/AuditEventsEndpointDocumentationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ void allAuditEvents() {
6767

6868
@Test
6969
void filteredAuditEvents() {
70-
OffsetDateTime now = OffsetDateTime.now();
71-
String queryTimestamp = DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(now);
70+
String queryTimestamp = "2017-11-07T09:37Z";
7271
given(this.repository.find("alice", now.toInstant(), "logout"))
7372
.willReturn(List.of(new AuditEvent("alice", "logout", Collections.emptyMap())));
7473
assertThat(this.mvc.get()

0 commit comments

Comments
 (0)