mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-13 06:34:50 +00:00
HHH-7669: JtaTransaction test fails on Oracle RAC
https://hibernate.onjira.com/browse/HHH-7669
This commit is contained in:
parent
b6763565e4
commit
ce573c8856
@ -1,18 +1,17 @@
|
|||||||
package org.hibernate.envers.test.integration.jta;
|
package org.hibernate.envers.test.integration.jta;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
|
||||||
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||||
import org.hibernate.envers.test.Priority;
|
import org.hibernate.envers.test.Priority;
|
||||||
import org.hibernate.envers.test.entities.IntTestEntity;
|
import org.hibernate.envers.test.entities.IntTestEntity;
|
||||||
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import org.hibernate.testing.jta.TestingJtaBootstrap;
|
import org.hibernate.testing.jta.TestingJtaBootstrap;
|
||||||
import org.hibernate.testing.jta.TestingJtaPlatformImpl;
|
import org.hibernate.testing.jta.TestingJtaPlatformImpl;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as {@link org.hibernate.envers.test.integration.basic.Simple}, but in a JTA environment.
|
* Same as {@link org.hibernate.envers.test.integration.basic.Simple}, but in a JTA environment.
|
||||||
@ -62,7 +61,8 @@ public void initData() throws Exception {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRevisionsCounts() throws Exception {
|
public void testRevisionsCounts() throws Exception {
|
||||||
Assert.assertEquals(Arrays.asList(1, 2), getAuditReader().getRevisions(IntTestEntity.class, id1));
|
Assert.assertEquals( 2, getAuditReader().getRevisions(
|
||||||
|
IntTestEntity.class, id1 ).size() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -70,7 +70,12 @@ public void testHistoryOfId1() {
|
|||||||
IntTestEntity ver1 = new IntTestEntity( 10, id1 );
|
IntTestEntity ver1 = new IntTestEntity( 10, id1 );
|
||||||
IntTestEntity ver2 = new IntTestEntity( 20, id1 );
|
IntTestEntity ver2 = new IntTestEntity( 20, id1 );
|
||||||
|
|
||||||
Assert.assertEquals(ver1, getAuditReader().find(IntTestEntity.class, id1, 1));
|
List<Number> revisions = getAuditReader().getRevisions(
|
||||||
Assert.assertEquals(ver2, getAuditReader().find(IntTestEntity.class, id1, 2));
|
IntTestEntity.class, id1 );
|
||||||
|
|
||||||
|
Assert.assertEquals( ver1, getAuditReader().find(
|
||||||
|
IntTestEntity.class, id1, revisions.get( 0 ) ) );
|
||||||
|
Assert.assertEquals( ver2, getAuditReader().find(
|
||||||
|
IntTestEntity.class, id1, revisions.get( 1 ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user