Skip to content

diskquota/jdbc: Testcontainers-backed integration tests + CI workflow#1528

Open
groldan wants to merge 1 commit into
GeoWebCache:mainfrom
groldan:feature/diskquota-jdbc_testcontainers
Open

diskquota/jdbc: Testcontainers-backed integration tests + CI workflow#1528
groldan wants to merge 1 commit into
GeoWebCache:mainfrom
groldan:feature/diskquota-jdbc_testcontainers

Conversation

@groldan
Copy link
Copy Markdown
Member

@groldan groldan commented May 14, 2026

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>.properties
fixture was absent.

The fixture-based PostgreSQLQuotaStoreTest / OracleQuotaStoreTest stays untouched.

How to run locally

mvn -f geowebcache/pom.xml -pl :gwc-diskquota-jdbc -am \
    -Ponline -DskipTests=true -DskipITs=false verify

Drop -DskipTests=true to also run surefire (HSQL + unit tests).

Known gap: Oracle IT is @ignored

Running the Oracle IT against gvenzl/oracle-xe:21-slim-faststart expose a longstanding, dialect-level gap (not introduced here): any SERIALIZABLE transaction in JDBCQuotaStore whose first read goes through the freshly indexed TILEPAGE / TILESET fails with ORA-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, like CREATE 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-CannotSerializeTransactionException layer 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 @Ignore can 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 @ClassRule startup, and there is a working scaffold ready for the retry-layer work.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant