Skip to content

Commit 3505b77

Browse files
Misc testing fixes:
* Upgrade Jacoco to 0.8.13 to support Java 24 * Jacoco would include tons of error messages about not supporting class file major version 68 (some library must be using it) * Add some null checks that had been left out of previous commits * add tests that cover those null checks * Add a better error code for operations not allowed to inidivudal filers (403) * add a test `logback.xml` that doesn't make a new "per-server" log file on each new test run. Was managable previously to just delete the generated ones, but with jqwik running 1000 tests each time, it would generate 1000 new files on each test run. Better to just not generate those (also cuts 10s off of the test runtime).
1 parent a8ff0b3 commit 3505b77

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
<plugin>
172172
<groupId>org.jacoco</groupId>
173173
<artifactId>jacoco-maven-plugin</artifactId>
174-
<version>0.8.12</version>
174+
<version>0.8.13</version>
175175
<configuration>
176176
<excludes>
177177
<exclude>ecfv5/**/*.class</exclude>

proxyserver/src/main/java/edu/suffolk/litlab/efsp/server/setup/tyler/OasisEcfWsCallback.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ public MessageReceiptMessageType notifyFilingReviewComplete(
291291
// Now for the review filing
292292
String filingId = "";
293293
for (IdentificationType id : revFiling.getDocumentIdentification()) {
294+
if (id == null) {
295+
continue;
296+
}
294297
if (id.getIdentificationCategory().getValue() instanceof TextType category) {
295298
if (category.getValue() != null && category.getValue().equalsIgnoreCase("FILINGID")) {
296299
filingId = id.getIdentificationID().getValue();

proxyserver/src/main/java/edu/suffolk/litlab/efsp/tyler/TylerErrorCodes.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class TylerErrorCodes {
4747
Map.entry("168", 400), // Lower court code not found
4848
Map.entry("169", 422), // Invalid birthdate
4949
Map.entry("170", 422), // Invalid password (when making an account? TODO(brycew))
50+
Map.entry("177", 403), // Operation not available for individual filers
5051
Map.entry("344", 422) // Doesn't handle cross references
5152
);
5253

proxyserver/src/test/java/edu/suffolk/litlab/efsp/server/setup/tyler/OasisEcfWsCallbackTest.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ public void setUp() throws SQLException {
106106
@Example
107107
public void testFailedShouldNotSendEmail() throws SQLException {
108108
// Just make sure we don't throw exceptions
109-
// cb.notifyFilingReviewComplete(null);
109+
cb.notifyFilingReviewComplete(null);
110110
cb.notifyFilingReviewComplete(new NotifyFilingReviewCompleteRequestMessageType());
111+
cb.notifyFilingReviewComplete(makeNullIdMsg());
111112

112113
when(mockCd.getFullLocationInfo(eq(courtId))).thenReturn(Optional.empty());
113114
cb.notifyFilingReviewComplete(makeMsg(null, null));
@@ -169,6 +170,18 @@ private NotifyFilingReviewCompleteRequestMessageType makeMsg(
169170
return msg;
170171
}
171172

173+
private NotifyFilingReviewCompleteRequestMessageType makeNullIdMsg() {
174+
var msg = new NotifyFilingReviewCompleteRequestMessageType();
175+
var rev = new ReviewFilingCallbackMessageType();
176+
rev.setDocumentFiledDate(Ecf4Helper.convertDate(LocalDate.of(2025, 07, 04)));
177+
rev.getDocumentIdentification().add(null);
178+
msg.setReviewFilingCallbackMessage(rev);
179+
var paymentMsg = new PaymentMessageType();
180+
paymentMsg.getAllowanceCharge().add(null);
181+
msg.setPaymentReceiptMessage(paymentMsg);
182+
return msg;
183+
}
184+
172185
private ReviewFilingCallbackMessageType makeMsgType(ReviewedDocumentType doc) {
173186
var msg = new ReviewFilingCallbackMessageType();
174187
msg.setDocumentFiledDate(Ecf4Helper.convertDate(LocalDate.of(2025, 07, 04)));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<configuration scan="true" scanPeriod="30 seconds">
2+
3+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
4+
<encoder>
5+
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [server=%X{serverId}] [user=%X{userId}] [session=%X{sessionId}] [corr=%X{correlationId}] [req=%X{requestId}] [op=%X{operation}] %-5level %logger{40} - %msg %rEx%n</pattern>
6+
</encoder>
7+
</appender>
8+
<logger name="org.ehcache.core.EhcacheManager" level="ERROR"/>
9+
<logger name="org.apache.cxf.wsdl.service.factory" level="WARN"/>
10+
<!-- Ignoring "WARN org.eclipse.jetty.server.handler.ContextHandler - Unimplemented getRequestCharacterEncoding() - use org.eclipse.jetty.servlet.ServletContextHandler" -->
11+
<logger name="org.eclipse.jetty.server.handler.ContextHandler" level="ERROR"/>
12+
<!--logger name="org.eclipse.jetty" level="DEBUG"/-->
13+
14+
<root level="info">
15+
<appender-ref ref="STDOUT" />
16+
<appender-ref ref="PerServer"/>
17+
</root>
18+
</configuration>

0 commit comments

Comments
 (0)