When running a Jakarta Data test against Db2 there is an issue with sorting not always being honored. To recreate, remove the @SkipIfSysProp(DB_DB2) in DataTest.java (/io.openliberty.data.internal_fat/fat/src/test/jakarta/data/DataTest.java)
@Test
@SkipIfSysProp(DB_DB2) //Failing on Db2 due to eclipselink issue.
public void testFindAndDeleteReturnsObjects() throws Exception {
This individual test can be run against Db2 with the following command:
./gradlew io.openliberty.data.internal_fat:buildandrun -Dfat.test.class.name=test.jakarta.data.web.DataTest -Dfat.test.method.name=testFindAndDeleteReturnsObjects -Dfat.bucket.db.type=DB2
The test should fail because a Package with id 70077 is returned first when Package with id 70071 should be returned first.
When running a Jakarta Data test against Db2 there is an issue with sorting not always being honored. To recreate, remove the
@SkipIfSysProp(DB_DB2)
in DataTest.java (/io.openliberty.data.internal_fat/fat/src/test/jakarta/data/DataTest.java)This individual test can be run against Db2 with the following command:
./gradlew io.openliberty.data.internal_fat:buildandrun -Dfat.test.class.name=test.jakarta.data.web.DataTest -Dfat.test.method.name=testFindAndDeleteReturnsObjects -Dfat.bucket.db.type=DB2
The test should fail because a Package with id 70077 is returned first when Package with id 70071 should be returned first.
I was able to recreate this with just JPA here: https://github.com/mswatosh/persistence-recreates/blob/89d7083a370f9ce04884400661d6f35a07c4b47b/src/main/java/com/example/application/PersistenceService.java#L93