Skip to content

Commit

Permalink
Updated logs for DAR PC time (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Edwards-cgi authored Dec 18, 2024
1 parent 8c8c34d commit 11e81f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void shouldSendDarNotifyEventSoapActionDarPcDateOutSideDriftLimitsRangeBehind(Ca

darPcStub.verifyNotificationReceivedWithBody(EXPECTED_DAR_PC_NOTIFICATION);
assertThat(capturedOutput)
.containsPattern("Response time from DAR PC is outside max drift limits of 1 minute 30 seconds. DAR PC Response time: "
+ responseDateTime.format(DateTimeFormatter.ISO_DATE_TIME)
+ ", Current time: [0-9\\-.T:]+Z for courthouse: York in courtroom: 1");
.containsPattern("Response time from DAR PC is outside max drift limits of 1 minute 30 seconds. DAR PC Response time: '"
+ responseDateTime.format(DateTimeFormatter.RFC_1123_DATE_TIME)
+ "', Current time: '[A-Za-z]{3}, \\d{1,2} [A-Za-z]{3} \\d{4} \\d{2}:\\d{2}:\\d{2} [A-Z]{3}' for courthouse: York in courtroom: 1");
}

@Test
Expand All @@ -112,9 +112,9 @@ void shouldSendDarNotifyEventSoapActionDarPcDateOutSideDriftLimitsRangeAhead(Cap

darPcStub.verifyNotificationReceivedWithBody(EXPECTED_DAR_PC_NOTIFICATION);
assertThat(capturedOutput)
.containsPattern("Response time from DAR PC is outside max drift limits of 1 minute 30 seconds. DAR PC Response time: "
+ responseDateTime.format(DateTimeFormatter.ISO_DATE_TIME)
+ ", Current time: [0-9\\-.T:]+Z for courthouse: York in courtroom: 1");
.containsPattern("Response time from DAR PC is outside max drift limits of 1 minute 30 seconds. DAR PC Response time: '"
+ responseDateTime.format(DateTimeFormatter.RFC_1123_DATE_TIME)
+ "', Current time: '[A-Za-z]{3}, \\d{1,2} [A-Za-z]{3} \\d{4} \\d{2}:\\d{2}:\\d{2} [A-Z]{3}' for courthouse: York in courtroom: 1");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ public void afterCompletion(MessageContext messageContext, Exception ex) {
Event event = XmlParser.unmarshal(darNotifyEvent.getXMLEventDocument(), Event.class);

log.warn("Response time from DAR PC is outside max drift limits of {}. " +
"DAR PC Response time: {}, Current time: {} for courthouse: {} in courtroom: {}",
"DAR PC Response time: '{}', Current time: '{}' for courthouse: {} in courtroom: {}",
DurationFormatUtils.formatDurationWords(maxTimeDrift.toMillis(), true, true),
responseDateTime.format(DateTimeFormatter.ISO_DATE_TIME),
currentTime.format(DateTimeFormatter.ISO_DATE_TIME),
dateHeader.getValue(),
currentTime.format(DateTimeFormatter.RFC_1123_DATE_TIME),
event.getCourthouse(),
event.getCourtroom());
}
Expand Down

0 comments on commit 11e81f1

Please sign in to comment.