JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.28k stars 690 forks source link

test: EXPOSED-233 Add additional SpringTransactionManager isolation test #1972

Closed FullOfOrange closed 8 months ago

FullOfOrange commented 8 months ago

Sorry for the late PR! Added some tests to test the isolation level of SpringTransactionManager.

  1. Write test code in SpringTransactionSingleConnectionTest to check if the issue that when there is only one connection, the connection cannot be obtained unless the default isolation level is set is fixed in the latest version.

  2. Add test code to check if the isolation level is set well in the existing test

Discussion

  1. I have confirmed that the problem encountered in this issue is resolved in the current version. I wonder if additional isolation tests are needed?

  2. The readOnly test was tested with a spy test to make sure the value is set correctly. Unfortunately, H2 does not seem to support readOnly properly, so I was unable to test it.

  3. May spring test also need to test real database