Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-16178

Migrate Hibernate ORM EntityTest, SessionFactoryTestCase unit test to use new ORM Session signature

    XMLWordPrintable

Details

    Description

      Find tests that mention WFLY-16178 and update the test code to include the tests excluded as per comments that references WFLY-16178.

      Reproduce steps:
      cd testsuite/integration/basic/
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.jpa.hibernate.entitytest.EntityTestCase
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.jpa.hibernate.sessionfactorytest.SessionFactoryTestCase
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.hibernate.Hibernate2LCacheStatsTestCase
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.hibernate.Hibernate4NativeAPIProviderTestCase
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.hibernate.Hibernate4NativeAPIEnversTestCase
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.hibernate.envers.Hibernate4NativeAPIEnversTestCase
      mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.hibernate.naturalid.HibernateNativeAPINaturalIdTestCase

      Note the following api differences:

      ORM 6:

      <T> T load(Class<T> theClass, Object id);

      ORM 5.3:

      <T> T load(Class<T> theClass, Serializable id);

      The "Session.save" method also has similar differences (e.g. ORM 5.3 signature 'java.io.Serializable org.hibernate.Session.save(java.lang.Object)`).

      Currently, we see test failures like:

      Caused by: java.lang.NoSuchMethodError: 'java.io.Serializable org.hibernate.Session.save(java.lang.Object)'
      at deployment.jpa_entitytest.jar//org.jboss.as.test.integration.jpa.hibernate.EntityTest.createCustomer(EntityTest.java:135)

      The above failures should be resolved by recompiling the org.jboss.as.test.integration.jpa.hibernate.entitytest.EntityTestCase test sources against Hibernate ORM 6.0.

      Attachments

        Issue Links

          Activity

            People

              smarlow1@redhat.com Scott Marlow
              smarlow1@redhat.com Scott Marlow
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: