HHH-13361 Cleanup test

This commit is contained in:
Chris Cranford 2021-12-18 19:03:56 -05:00 committed by Chris Cranford
parent aa5bdab6ec
commit d9fa35c6f1
1 changed files with 0 additions and 28 deletions

View File

@ -6,14 +6,12 @@
*/
package org.hibernate.orm.test.envers.integration.ids.embeddedid;
import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate;
import static org.hibernate.testing.transaction.TransactionUtil.doInJPA;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.util.Arrays;
import org.hibernate.orm.test.envers.BaseEnversFunctionalTestCase;
import org.hibernate.orm.test.envers.BaseEnversJPAFunctionalTestCase;
import org.hibernate.orm.test.envers.Priority;
import org.hibernate.testing.TestForIssue;
@ -63,32 +61,7 @@ public class NestedEmbeddedIdentifiersTest extends BaseEnversJPAFunctionalTestCa
@Test
public void testIdentifierAtRevision1() {
// select e__
// from org.hibernate.orm.test.envers.integration.ids.embeddedid.OwnerOfRelationCode_AUD e__
// where e__.originalId.REV.id = (select max(e2__.originalId.REV.id)
// from org.hibernate.orm.test.envers.integration.ids.embeddedid.OwnerOfRelationCode_AUD e2__
// where e2__.originalId.REV.id <= :revision
// and e__.originalId.compositeEntity = e2__.originalId.compositeEntity
// and e__.originalId.secondIdentifier = e2__.originalId.secondIdentifier)
// and e__.REVTYPE <> :_p0
// and e__.originalId.compositeEntity_firstCode = :_p1
// and e__.originalId.compositeEntity_secondCode = :_p2
// and e__.originalId.secondIdentifier = :_p3
//
// select e__
// from org.hibernate.orm.test.envers.integration.ids.embeddedid.OwnerOfRelationCode_AUD e__
// where e__.originalId.REV.id = (select max(e2__.originalId.REV.id)
// from org.hibernate.orm.test.envers.integration.ids.embeddedid.OwnerOfRelationCode_AUD e2__
// where e2__.originalId.REV.id <= :revision
// and e__.originalId.compositeEntity_firstCode = e2__.originalId.compositeEntity_firstCode
// and e__.originalId.compositeEntity_secondCode = e2__.originalId.compositeEntity_secondCode
// and e__.originalId.secondIdentifier = e2__.originalId.secondIdentifier)
// and e__.REVTYPE <> :_p0
// and e__.originalId.compositeEntity_firstCode = :_p1
// and e__.originalId.compositeEntity_secondCode = :_p2
// and e__.originalId.secondIdentifier = :_p3
final OwnerOfRelationCode rev1 = getAuditReader().find( OwnerOfRelationCode.class, id, 1 );
System.out.println( rev1 );
assertEquals( rev1.getCodeObject().getSecondIdentifier(), "secondIdentifier" );
assertEquals( rev1.getCodeObject().getCompositeEntity().getFirstCode(), "firstCode" );
assertEquals( rev1.getCodeObject().getCompositeEntity().getSecondCode(), "secondCode" );
@ -98,7 +71,6 @@ public class NestedEmbeddedIdentifiersTest extends BaseEnversJPAFunctionalTestCa
@Test
public void testIdentifierAtRevision2() {
final OwnerOfRelationCode rev2 = getAuditReader().find( OwnerOfRelationCode.class, id, 2 );
System.out.println( rev2 );
assertEquals( rev2.getCodeObject().getSecondIdentifier(), "secondIdentifier" );
assertEquals( rev2.getCodeObject().getCompositeEntity().getFirstCode(), "firstCode" );
assertEquals( rev2.getCodeObject().getCompositeEntity().getSecondCode(), "secondCode" );