diskquota/jdbc: Testcontainers-backed integration tests + CI workflow#1528
Open
groldan wants to merge 1 commit into
Open
diskquota/jdbc: Testcontainers-backed integration tests + CI workflow#1528groldan wants to merge 1 commit into
groldan wants to merge 1 commit into
Conversation
Add failsafe-driven integration tests that run the JDBCQuotaStoreTest suite against real PostgreSQL and Oracle XE via Testcontainers. Add a GitHub Actions workflow that runs them on PRs touching the diskquota module. The legacy fixture-based tests stay in place and keep skipping cleanly when no fixture file is present. The Oracle IT is @ignored for now: SERIALIZABLE transactions in JDBCQuotaStore hit ORA-08176 on freshly-indexed tables, which the Oracle-recommended retry-on-serialization-failure pattern resolves; the IT could be re-checked and enabled once retry is implemented. No production code is modified. on-behalf-of: @camptocamp <info@camptocamp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Testcontainers-driven integration tests for the JDBC DiskQuota store, so the PostgreSQL and Oracle dialects are actually exercised in CI - until now both were skipped whenever the
~/.geowebcache/<dialect>.propertiesfixture was absent.
The fixture-based
PostgreSQLQuotaStoreTest/OracleQuotaStoreTeststays untouched.How to run locally
mvn -f geowebcache/pom.xml -pl :gwc-diskquota-jdbc -am \ -Ponline -DskipTests=true -DskipITs=false verifyDrop
-DskipTests=trueto also run surefire (HSQL + unit tests).Known gap: Oracle IT is @ignored
Running the Oracle IT against
gvenzl/oracle-xe:21-slim-faststartexpose a longstanding, dialect-level gap (not introduced here): any SERIALIZABLE transaction inJDBCQuotaStorewhose first read goes through the freshly indexed TILEPAGE / TILESET fails withORA-08176: consistent read failure; rollback data not available. As per Oracle's own diagnostic, this is the documented behavior when a consistent-read snapshot must reach an operation that produces no undo, likeCREATE INDEX.The quota store creates 4 indexes on TILEPAGE at startup, so the very first SERIALIZABLE read of a fresh schema hits it.
Oracle's recommended remedy is exactly the retry-on-
CannotSerializeTransactionExceptionlayer proposed in #1527 to address PostgreSQL's clustered SSI aborts. Once that lands, the Oracle IT will succeed on retry (unless other issues are found) and the@Ignorecan be removed; the IT class javadoc explains the symptom and root cause in detail for the next reader.We keep the Oracle IT class (rather than deleting it) so the container plumbing stays exercised up to
@ClassRulestartup, and there is a working scaffold ready for the retry-layer work.