Skip to content

Commit

Permalink
Rerun tests related GROOVY-5106
Browse files Browse the repository at this point in the history
Closes gh-77
  • Loading branch information
rainboyan committed Jan 6, 2025
1 parent 0ae5932 commit 2a5eef4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ import spock.lang.Specification
* Created by graemerocher on 04/11/16.
*/
@ApplyDetachedCriteriaTransform
@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106")
class TablePerSubClassAndEmbeddedSpec extends Specification {

@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(Company, Vendor)
@Shared Map config = [
'dataSource.url':"jdbc:h2:mem:grailsDB;LOCK_TIMEOUT=10000",
'dataSource.dbCreate': 'create-drop',
'dataSource.dialect': 'org.hibernate.dialect.H2Dialect'
]
@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(config, Company, Vendor)
@Shared PlatformTransactionManager transactionManager = hibernateDatastore.getTransactionManager()

@Rollback
Expand Down Expand Up @@ -61,7 +65,7 @@ Vendor.where {
}


//@Entity
@Entity
class Company {
Address address
String name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package grails.gorm.tests.inheritance

import spock.lang.Ignore

import grails.gorm.annotation.Entity
import grails.gorm.tests.GormDatastoreSpec

@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106")
class SubclassToOneProxySpec extends GormDatastoreSpec {

void "the hasOne is a proxy and unwraps"() {
Expand All @@ -26,7 +23,7 @@ class SubclassToOneProxySpec extends GormDatastoreSpec {
}
}

//@Entity
@Entity
class SuperclassProxy {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import spock.lang.Issue
* Created by graemerocher on 29/05/2017.
*/
@Issue('https://github.com/grails/grails-data-mapping/issues/937')
@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106")
class TablePerConcreteClassAndDateCreatedSpec extends GormSpec {
void "should set the dateCreated automatically"() {
given:
Expand Down Expand Up @@ -42,7 +41,7 @@ class TablePerConcreteClassAndDateCreatedSpec extends GormSpec {
}
}

//@Entity
@Entity
abstract class Vehicle {
String name
Date dateCreated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package grails.gorm.tests.inheritance

import spock.lang.Ignore

import org.grails.orm.hibernate.GormSpec
import spock.lang.Issue

@Issue('https://github.com/grails/gorm-hibernate5/issues/151')
@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106")
class TablePerConcreteClassImportedSpec extends GormSpec {
void "test that subclasses are added to the imports on the metamodel"() {
expect:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ import spock.lang.Specification
/**
* Created by graemerocher on 04/05/2017.
*/
@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106")
class CascadeValidationSpec extends Specification {

@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(Business, Person, Employee)
@Shared Map config = [
'dataSource.url':"jdbc:h2:mem:grailsDB;LOCK_TIMEOUT=10000",
'dataSource.dbCreate': 'create-drop',
'dataSource.dialect': 'org.hibernate.dialect.H2Dialect'
]
@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(config, Business, Person, Employee)

@Rollback
@Issue('https://github.com/grails/grails-data-mapping/issues/926')
Expand Down Expand Up @@ -46,7 +50,7 @@ class Business {
]

}
//@Entity
@Entity
abstract class Person {

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package grails.gorm.tests.validation

import spock.lang.Ignore

import grails.gorm.annotation.Entity
import grails.gorm.transactions.Rollback
import org.grails.datastore.mapping.reflect.EntityReflector
Expand All @@ -12,10 +10,14 @@ import spock.lang.Shared
import spock.lang.Specification

@Rollback
@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106")
class UniqueInheritanceSpec extends Specification {

@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(Item, ConcreteProduct, Product, Book)
@Shared Map config = [
'dataSource.url':"jdbc:h2:mem:grailsDB;LOCK_TIMEOUT=10000",
'dataSource.dbCreate': 'create-drop',
'dataSource.dialect': 'org.hibernate.dialect.H2Dialect'
]
@Shared @AutoCleanup HibernateDatastore hibernateDatastore = new HibernateDatastore(config, Item, ConcreteProduct, Product, Book)

void "unique constraint works directly"() {
setup:
Expand Down Expand Up @@ -78,7 +80,7 @@ class ConcreteProduct extends Product {

}

//@Entity
@Entity
abstract class Product {
String name

Expand Down

0 comments on commit 2a5eef4

Please sign in to comment.