[ 
https://issues.apache.org/jira/browse/OPENJPA-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140099#comment-18140099
 ] 

ASF subversion and git services commented on OPENJPA-3028:
----------------------------------------------------------

Commit d6225bab5bf045a891e6db15cb534d642aaac9b7 in openjpa's branch 
refs/heads/master from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=d6225bab5 ]

[OPENJPA-3028] Oracle unit tests and test profiles (#281)

* [OPENJPA-3028] Load COALESCE, CASE and NULLIF of a java.sql.Date or Time as 
such

The Oracle driver returns a Timestamp for a DATE column, which also holds
java.sql.Date and java.sql.Time fields. Selecting COALESCE or CASE over
such a field loaded the value with getObject and converted it to the type
of the field, which failed on Oracle with "ClassCastException: Cannot
convert object ... of type class java.sql.Timestamp into an instance of
class java.sql.Date".

COALESCE, CASE and NULLIF expressions of type java.sql.Date or
java.sql.Time are now read with ResultSet.getDate and getTime, so the
driver does the conversion. Such queries now return a java.sql.Date or
java.sql.Time on Oracle, as on the other databases. Expressions of any
other type are read with getObject as before, and Filters.convert is
unchanged.

* [OPENJPA-3028] Do not use a BIGINT column definition in 
TestBulkDeleteSharedCollectionTable

Oracle has no BIGINT type, so creating the shared collection table
failed with ORA-00902. The owner join column now takes the type of the
id column it references, as on the other databases.

* [OPENJPA-3028] Compare the Oracle result of NULLIF on a date as a date

The type of NULLIF over a date field and a JDBC escape is not known, so
the value of the driver is returned as it is. A date field is mapped to
an Oracle DATE, for which the Oracle driver returns a Timestamp, so
testCaseAndNullIfInMemory failed with "expected:<[2022-06-15 00:00:00.0,
null]> but was:<[2022-06-15, null]>". On Oracle a Timestamp at the start
of a day is now compared as the date it stands for.

* [OPENJPA-3028] Do not batch the statements counted in 
TestDeleteOrderForUnmappedForeignKey

testCycleOfNullableLogicalForeignKeys counts the DELETE statements of a
flush. Oracle batches statements by default, so both DELETEs were run as
one batch and counted once ("expected:<2> but was:<1>"). This test now
disables batching while it runs; the other tests of the class keep the
batch limit of the database.

* [OPENJPA-3028] Run the test-oracle-docker profile on Oracle Database Free

The profile used gvenzl/oracle-xe 18.4, which has no arm64 image, and
the ojdbc8 19.3 driver. It now starts gvenzl/oracle-free:23-slim and
tests with ojdbc11 23.26.4.0.0 from Maven Central.

The init script did not take effect: it set processes=250 in the spfile
without restarting the database, and the image now reads its init
scripts from /container-entrypoint-initdb.d. It is replaced by a shell
script that raises processes to 1000 and sessions to 1600 and restarts
the database before the image reports it ready, so the test suite no
longer runs out of connections (ORA-12516/ORA-12519).

The EM Express port 5500 is no longer published, and the build matrix
and TCK runner scripts stop the container by its new name.

Usage:
  mvn -N -Ptest-oracle-docker docker:start
  mvn install -Ptest-oracle-docker
  mvn -N -Ptest-oracle-docker docker:stop

* [OPENJPA-3028] Use the ojdbc11 driver from Maven Central in the test-oracle 
profile

The test-oracle profile, for an Oracle database of your own, defaulted to
com.oracle.ojdbc:ojdbc8:19.3.0.0 and documented installing a driver into
a local repository by hand. It now defaults to
com.oracle.database.jdbc:ojdbc11:23.26.4.0.0 from Maven Central, as the
test-oracle-docker profile does. The unused oracle.maven.repo property is
removed. Another driver can still be chosen with -Doracle.groupid,
-Doracle.artifactid and -Doracle.version.

> Jakarta Persistence 3.2 TCK failures on Derby, MySQL and SQL Server
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-3028
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3028
>             Project: OpenJPA
>          Issue Type: Epic
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>         Attachments: run_de.tar.xz, run_ms.tar.xz, run_my.tar.xz, 
> run_or.tar.xz
>
>
> Results of the Jakarta Persistence 3.2 TCK with 
> {{openjpa-integration/tck/run-tck32.sh}} (reported by Maxim Solodovnik on 
> dev@):
> * PostgreSQL 16: passed
> * MySQL 8.4.8: 2134 tests, 43 errors
> * SQL Server 2017-CU12: 2134 tests, 45 errors
> * Derby: 2134 tests, 184 errors
> The sub-tasks group the errors by cause. Several groups show up on more than 
> one database. Where the TCK output only says "<test> failed", the cause still 
> has to be found from the TCK logs.
> Note: the TCK build does not work with Maven 3.10.0; 3.9.x works.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to