udayagiri-sivasai-dev commented on code in PR #5763:
URL: https://github.com/apache/fineract/pull/5763#discussion_r3090175218
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsAccountTransactionTest.java:
##########
@@ -394,16 +399,21 @@ public void run() {
} else {
assertEquals(4, responses.size(), "Response size for
without-enlosingTransaction response");
Integer statusCode1 = responses.get(0).getStatusCode();
+ String msg1 =
Strings.nullToEmpty(responses.get(0).getBody());
assertNotNull(statusCode1, "First
without-enlosingTransaction response status code");
- assertTrue(SC_OK == statusCode1 || SC_CONFLICT ==
statusCode1,
- "First without-enlosingTransaction response status
code: " + statusCode1);
+ assertTrue(
+ SC_OK == statusCode1
+ || SC_CONFLICT == statusCode1
+ || (SC_FORBIDDEN == statusCode1 &&
msg1.contains("Record has changed since last read")),
Review Comment:
Updated this based on your suggestion.
Instead of matching that message in the test, I changed the exception
classification in `ErrorHandler` so the MariaDB snapshot-isolation case
(`Record has changed since last read`) is treated as a concurrency /
pessimistic locking failure and follows the existing `409 Conflict` path.
I also verified it locally with:
* `SavingsAccountTransactionTest.testDeadlockSavingsBatchTransactions`
* `SavingsAccountTransactionTest.testConcurrentSavingsBatchTransactions`
--
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]