Skip to content

FINERACT-2525: Accept MariaDB snapshot isolation conflict responses in savings integration tests#5763

Open
udayagiri-sivasai-dev wants to merge 1 commit intoapache:developfrom
udayagiri-sivasai-dev:FINERACT-2525
Open

FINERACT-2525: Accept MariaDB snapshot isolation conflict responses in savings integration tests#5763
udayagiri-sivasai-dev wants to merge 1 commit intoapache:developfrom
udayagiri-sivasai-dev:FINERACT-2525

Conversation

@udayagiri-sivasai-dev
Copy link
Copy Markdown

What changed

  • Updated SavingsAccountTransactionTest to accept MariaDB 12.2 snapshot-isolation conflict responses that return 403 with "Record has changed since last read".

Why

  • Under MariaDB 12.2 with innodb_snapshot_isolation=ON, concurrency tests can return a different valid conflict response than the tests previously allowed.

How I tested

  • :integration-tests:test --tests "*SavingsAccountTransactionTest.testDeadlockSavingsBatchTransactions"
  • :integration-tests:test --tests "*SavingsAccountTransactionTest.testConcurrentSavingsBatchTransactions"
  • :integration-tests:test --tests "*SavingsAccountTransactionTest"

@San-43
Copy link
Copy Markdown
Contributor

San-43 commented Apr 12, 2026

Please sign your commits as described in the CONTRIBUTING.md signing guide.

assertTrue(
SC_OK == statusCode1
|| SC_CONFLICT == statusCode1
|| (SC_FORBIDDEN == statusCode1 && msg1.contains("Record has changed since last read")),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matching on Record has changed since last read is fragile - if database changes the error message text in a future version, these tests will break again. If the exception were classified as SomeConcurrencyException(not sure, need to check what the actual exception being thrown is) at the ErrorHandler level instead, it would map to 409, and the tests would just work since they already accept SC_CONFLICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants