Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2012-12-12 06:43:18 -0500
committerMartin Taal2012-12-12 06:43:18 -0500
commit9be9a4454325ff56c99109a4a255b373d5bc9a99 (patch)
tree2e339f437db021f7f48752357ccb7ddbf384ecd1 /plugins/org.eclipse.emf.cdo.tests.hibernate
parent36ba7a77d238f78603f8ef8b65e14ae190fe369e (diff)
downloadcdo-9be9a4454325ff56c99109a4a255b373d5bc9a99.tar.gz
cdo-9be9a4454325ff56c99109a4a255b373d5bc9a99.tar.xz
cdo-9be9a4454325ff56c99109a4a255b373d5bc9a99.zip
Hibernate auditing: added check on incrementing version number
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.hibernate')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java
index c1a702897c..3840bf18bf 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/CDOObjectHistoryTest.java
@@ -110,18 +110,22 @@ public class CDOObjectHistoryTest extends AbstractCDOTest
long commitTime1 = transaction.commit().getTimeStamp();
assertEquals(true, session.getRepositoryInfo().getCreationTime() < commitTime1);
assertEquals("ESC", company.getName());
+ final CDOObject cdoObjectCompany = CDOUtil.getCDOObject(company);
+ assertEquals(1, cdoObjectCompany.cdoRevision().getVersion());
company.setName("Sympedia");
long commitTime2 = transaction.commit().getTimeStamp();
assertEquals(true, commitTime1 < commitTime2);
assertEquals(true, session.getRepositoryInfo().getCreationTime() < commitTime2);
assertEquals("Sympedia", company.getName());
+ assertEquals(2, cdoObjectCompany.cdoRevision().getVersion());
company.setName("Eclipse");
long commitTime3 = transaction.commit().getTimeStamp();
assertEquals(true, commitTime2 < commitTime3);
assertEquals(true, session.getRepositoryInfo().getCreationTime() < commitTime2);
assertEquals("Eclipse", company.getName());
+ assertEquals(3, cdoObjectCompany.cdoRevision().getVersion());
resource.getContents().remove(company);
long commitTime4 = transaction.commit().getTimeStamp();

Back to the top