HHH-8183 re-activating test now that QA allows Synonym creation

This commit is contained in:
Brett Meyer 2013-08-13 10:28:31 -04:00
parent 90532087d5
commit cc992e0e1a
1 changed files with 96 additions and 99 deletions

View File

@ -44,107 +44,104 @@ import org.junit.Test;
@RequiresDialect( Oracle9iDialect.class ) @RequiresDialect( Oracle9iDialect.class )
public class SynonymValidationTest extends BaseCoreFunctionalTestCase { public class SynonymValidationTest extends BaseCoreFunctionalTestCase {
// TODO: The QA database matrix does not currently have sufficient permissions to be able to create synonyms. @Override
// Until resolved, disable. protected Class<?>[] getAnnotatedClasses() {
return new Class<?>[] { TestEntity.class };
}
// @Override
// protected Class<?>[] getAnnotatedClasses() {
// return new Class<?>[] { TestEntity.class };
// }
//
@Test @Test
public void testSynonymValidation() { public void testSynonymValidation() {
// Session s = openSession(); Session s = openSession();
// s.getTransaction().begin(); s.getTransaction().begin();
// s.createSQLQuery( "CREATE SYNONYM test_synonym FOR test_entity" ).executeUpdate(); s.createSQLQuery( "CREATE SYNONYM test_synonym FOR test_entity" ).executeUpdate();
// s.getTransaction().commit(); s.getTransaction().commit();
// s.close(); s.close();
//
// Configuration cfg = new Configuration(); Configuration cfg = new Configuration();
// cfg.addAnnotatedClass( TestEntityWithSynonym.class ); cfg.addAnnotatedClass( TestEntityWithSynonym.class );
// cfg.setProperty( AvailableSettings.ENABLE_SYNONYMS, "true" ); cfg.setProperty( AvailableSettings.ENABLE_SYNONYMS, "true" );
//
// SchemaValidator schemaValidator = new SchemaValidator( cfg ); SchemaValidator schemaValidator = new SchemaValidator( cfg );
// schemaValidator.validate(); schemaValidator.validate();
//
// s = openSession(); s = openSession();
// s.getTransaction().begin(); s.getTransaction().begin();
// s.createSQLQuery( "DROP SYNONYM test_synonym FORCE" ).executeUpdate(); s.createSQLQuery( "DROP SYNONYM test_synonym FORCE" ).executeUpdate();
// s.getTransaction().commit(); s.getTransaction().commit();
// s.close(); s.close();
}
@Entity
@Table(name = "test_entity")
private static class TestEntity {
@Id
@GeneratedValue
private Long id;
@Column(nullable = false)
private String key;
private String value;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@Entity
@Table(name = "test_synonym")
private static class TestEntityWithSynonym {
@Id
@GeneratedValue
private Long id;
@Column(nullable = false)
private String key;
private String value;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
} }
//
// @Entity
// @Table(name = "test_entity")
// private static class TestEntity {
// @Id
// @GeneratedValue
// private Long id;
//
// @Column(nullable = false)
// private String key;
//
// private String value;
//
// public Long getId() {
// return id;
// }
//
// public void setId(Long id) {
// this.id = id;
// }
//
// public String getKey() {
// return key;
// }
//
// public void setKey(String key) {
// this.key = key;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
// }
//
// @Entity
// @Table(name = "test_synonym")
// private static class TestEntityWithSynonym {
// @Id
// @GeneratedValue
// private Long id;
//
// @Column(nullable = false)
// private String key;
//
// private String value;
//
// public Long getId() {
// return id;
// }
//
// public void setId(Long id) {
// this.id = id;
// }
//
// public String getKey() {
// return key;
// }
//
// public void setKey(String key) {
// this.key = key;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
// }
} }