adamsaghy commented on code in PR #6069:
URL: https://github.com/apache/fineract/pull/6069#discussion_r3630881419


##########
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventCheckHelper.java:
##########
@@ -184,6 +184,24 @@ private void loanAccountDataV1Check(Class<? extends 
AbstractLoanEvent> eventClaz
         GetLoansLoanIdResponse body = ok(() -> 
fineractClient.loans().retrieveOneLoan(loanId,
                 Map.of("staffInSelectedOfficeOnly", false, "associations", 
"all", "exclude", "", "fields", "")));
 
+        // Earlier steps may have raised events of the same type for this 
loan; assertEvent consumes the

Review Comment:
   Not really relevant for upgrading dependencies to Spring Boot 4.1.
   
   Would you mind extract and raise this in a new PR?



##########
fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventFailureDiagnostics.java:
##########
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.test.messaging;
+
+import static org.apache.fineract.client.feign.util.FeignCalls.ok;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import java.lang.reflect.Type;
+import java.util.List;
+import java.util.Map;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.client.feign.FineractFeignClient;
+import org.apache.fineract.test.messaging.config.EventProperties;
+import org.apache.fineract.test.messaging.store.EventStore;
+import org.springframework.stereotype.Component;
+
+/**
+ * Explains why an event assertion timed out.
+ *
+ * <p>
+ * An event only reaches the test through two independent stages: it must be 
persisted into {@code m_external_event} by
+ * the business transaction, and it must then be published to the broker by 
the "Send Asynchronous Events" job. A
+ * timeout alone cannot tell those apart, which makes intermittent CI failures 
hard to attribute. This queries the
+ * server for what it actually persisted so the log states which stage lost 
the event.
+ *
+ * <p>
+ * Only runs when {@code EVENT_FAILURE_DIAGNOSTICS_ENABLED} is set, and only 
after an assertion has already failed, so
+ * it never affects passing runs. Any error raised while gathering diagnostics 
is swallowed - it must never replace the
+ * original assertion failure.
+ */
+@Slf4j
+@Component
+@RequiredArgsConstructor
+public class EventFailureDiagnostics {

Review Comment:
   Not really relevant for upgrading dependencies to Spring Boot 4.1.
   
   Would you mind extract and raise this in a new PR?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to