From cbf1f6cc44f73730221d5833613e8e7caea77398 Mon Sep 17 00:00:00 2001 From: Strong Liu Date: Wed, 15 Jun 2011 10:57:31 +0800 Subject: [PATCH] HHH-6322 remove local tests --- .../java/org/hibernate/test/optlock/A.java | 54 ------------------- .../test/optlock/IssueHibernateTest.java | 45 ---------------- 2 files changed, 99 deletions(-) delete mode 100644 hibernate-testsuite/src/test/java/org/hibernate/test/optlock/A.java delete mode 100644 hibernate-testsuite/src/test/java/org/hibernate/test/optlock/IssueHibernateTest.java diff --git a/hibernate-testsuite/src/test/java/org/hibernate/test/optlock/A.java b/hibernate-testsuite/src/test/java/org/hibernate/test/optlock/A.java deleted file mode 100644 index 7e34a11019..0000000000 --- a/hibernate-testsuite/src/test/java/org/hibernate/test/optlock/A.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.hibernate.test.optlock; - - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Version; - -@Table(name = "taba") -@Entity -public class A { - private static final long serialVersionUID = 1L; - - private int id; - private int version; - private String descr; - - public A() { - } - - public A(int id, String descr) { - this.id = id; - this.descr = descr; - } - - @Id - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - @Version - public int getVersion() { - return version; - } - - public void setVersion(int version) { - this.version = version; - } - - @Basic - public String getDescr() { - return descr; - } - - public void setDescr(String descr) { - this.descr = descr; - } -} - diff --git a/hibernate-testsuite/src/test/java/org/hibernate/test/optlock/IssueHibernateTest.java b/hibernate-testsuite/src/test/java/org/hibernate/test/optlock/IssueHibernateTest.java deleted file mode 100644 index 2d59ea0cf7..0000000000 --- a/hibernate-testsuite/src/test/java/org/hibernate/test/optlock/IssueHibernateTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.hibernate.test.optlock; - -import org.hibernate.Session; -import org.hibernate.test.annotations.TestCase; - -/** - * @author Strong Liu - */ -public class IssueHibernateTest extends TestCase { - public IssueHibernateTest() { - } - - public IssueHibernateTest(String name) { - super( name ); - } - - public void testCheckDBVersion() { - Session s = openSession(); - s.beginTransaction(); - A a1 = new A( 1, "test1" ); - s.persist( a1 ); - s.getTransaction().commit(); - s.close(); - - s = openSession(); - s.beginTransaction(); - A a=(A)s.get( A.class,1 ); - assertEquals( 0,a.getVersion() ); - s.clear(); - - Session s2 = openSession(); - s2.beginTransaction(); - A a2 = (A)s2.get( A.class,1 ); - a2.setDescr( "changed 2" ); - s2.merge( a2 ); - s2.getTransaction().commit(); - - - } - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { A.class }; - } -}