Richard Zowalla created OPENJPA-3016:
----------------------------------------
Summary: Criteria tests fail on MariaDB and exhaust the connection
pool; TestPessimisticLocks fails on PostgreSQL
Key: OPENJPA-3016
URL: https://issues.apache.org/jira/browse/OPENJPA-3016
Project: OpenJPA
Issue Type: Bug
Components: jpa
Reporter: Richard Zowalla
The first scheduled run of the Databases workflow (OPENJPA-3011) was red: run
38204987477 of 12 Oct 2026 on master.
check success
build (Java 21, test-mysql-docker) success
build (Java 21, test-postgresql-docker) failure
build (Java 21, test-mariadb-docker) failure
PostgreSQL 11: 197 tests, 1 failure,
org.apache.openjpa.persistence.lockmgr.TestPessimisticLocks.
MariaDB 11.8: the criteria package fails in bulk, starting about three minutes
into the run, e.g.
TestTypesafeCriteria 124 run, 45 failures, 70 errors
TestMetaModelTypesafeCriteria 29 run, 10 failures, 11 errors
TestTypeSafeCondExpression 55 run, 9 failures, 27 errors
TestSubqueries 28 run, 13 failures, 15 errors
TestQueryByExample 7 run, 1 failure, 6 errors
and later, after those failures, the connection pool is exhausted:
org.apache.openjpa.persistence.PersistenceException: Cannot get a connection,
pool error Timeout waiting for idle object, maxWaitDuration=PT9.999990575S
Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
TestMultiselect then reports 28 errors in 170 seconds, all of them connection
timeouts.
The ordering suggests the pool exhaustion is a consequence rather than the
cause: the criteria tests fail first for some dictionary reason, and the
failures leak connections until the pool is empty. That needs confirming, and
both the dictionary failures and the leak are worth fixing - a test whose
failure path leaks a connection turns one red test into a red suite.
To reproduce, start the server yourself, since the docker profiles do not start
containers during mvn test:
docker run -d --name ojpa-maria -e MARIADB_DATABASE=openjpatst -e
MARIADB_ROOT_PASSWORD=openjpatst -p 3306:3306 mariadb:11.8
mvn -Ptest-mariadb-docker -pl openjpa-persistence-jdbc -am test
-Dtest='org/apache/openjpa/persistence/criteria/Test*.java'
--
This message was sent by Atlassian Jira
(v8.20.10#820010)