diff --git a/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/RxServiceImplSpec.groovy b/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/RxServiceImplSpec.groovy index 792cc4682..3634eb4cf 100644 --- a/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/RxServiceImplSpec.groovy +++ b/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/RxServiceImplSpec.groovy @@ -170,9 +170,13 @@ class Book { @Service(value = Book) interface BookService { +// Cannot implement method for argument [title]. No property exists on domain class [java.lang.String] //Single findBookAuthor(String title) +// No implementations possible for method 'rx.Observable updateBook(java.lang.String, java.lang.String)'. Please use an abstract class instead and provide an implementation. //@Query("update ${Book b} set $b.title = $title where $b.title = $oldTitle") + +// No implementations possible for method 'rx.Observable updateBook(java.lang.String, java.lang.String)'. Please use an abstract class instead and provide an implementation. //rx.Observable updateBook(String oldTitle, String title) Single updateBook(Serializable id, String title) diff --git a/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy b/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy index 82d2d15ad..0bdad7af5 100644 --- a/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy +++ b/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/ServiceImplSpec.groovy @@ -18,7 +18,6 @@ import spock.lang.Specification /** * Created by graemerocher on 06/02/2017. */ -@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106 - The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity and org.grails.datastore.gorm.GormEntity") class ServiceImplSpec extends Specification { @AutoCleanup SimpleMapDatastore datastore = new SimpleMapDatastore( @@ -310,6 +309,27 @@ class ServiceImplSpec extends Specification { } + @Ignore(''' + java.lang.StackOverflowError + at groovy.lang.Closure.call(Closure.java:435) + at org.grails.datastore.mapping.core.DatastoreUtils.execute(DatastoreUtils.java:319) + at org.grails.datastore.gorm.AbstractDatastoreApi.execute(AbstractDatastoreApi.groovy:40) + at org.grails.datastore.gorm.GormInstanceApi.isAttached(GormInstanceApi.groovy:227) + at org.grails.datastore.gorm.GormEntity$Trait$Helper.isAttached(GormEntity.groovy:176) + at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:60) + at groovy.json.DefaultJsonGenerator.getObjectProperties(DefaultJsonGenerator.java:257) + at groovy.json.DefaultJsonGenerator.writeObject(DefaultJsonGenerator.java:234) + at groovy.json.DefaultJsonGenerator.writeMapEntry(DefaultJsonGenerator.java:401) + at groovy.json.DefaultJsonGenerator.writeMap(DefaultJsonGenerator.java:389) + at groovy.json.DefaultJsonGenerator.writeObject(DefaultJsonGenerator.java:204) + at groovy.json.DefaultJsonGenerator.writeMapEntry(DefaultJsonGenerator.java:401) + at groovy.json.DefaultJsonGenerator.writeMap(DefaultJsonGenerator.java:389) + at groovy.json.DefaultJsonGenerator.writeObject(DefaultJsonGenerator.java:235) + at groovy.json.DefaultJsonGenerator.writeMapEntry(DefaultJsonGenerator.java:401) + at groovy.json.DefaultJsonGenerator.writeMap(DefaultJsonGenerator.java:389) + at groovy.json.DefaultJsonGenerator.writeObject(DefaultJsonGenerator.java:235) + at groovy.json.DefaultJsonGenerator.writeMapEntry(DefaultJsonGenerator.java:401) + at groovy.json.DefaultJsonGenerator.writeMap(DefaultJsonGenerator.java:389)''') void "test interface projection"() { given: ProductService productService = datastore.getService(ProductService) diff --git a/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy b/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy index 53b5d41c7..b2f8fd35f 100644 --- a/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy +++ b/grails-datastore-gorm-test/src/test/groovy/grails/gorm/services/multitenancy/partitioned/PartitionMultiTenancySpec.groovy @@ -29,7 +29,18 @@ class PartitionMultiTenancySpec extends Specification { ) @Shared IBookService bookDataService = datastore.getService(IBookService) - @Ignore("java.lang.IllegalStateException: Either class [grails.gorm.services.multitenancy.partitioned.Book] is not a domain class or GORM has not been initialized correctly or has already been shutdown. Ensure GORM is loaded and configured correctly before calling any methods on a GORM entity.") + @Ignore('''Expected exception of type 'org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException', but got 'java.lang.IllegalStateException\' + at app//org.spockframework.lang.SpecInternals.checkExceptionThrown(SpecInternals.java:84) + at app//org.spockframework.lang.SpecInternals.thrownImpl(SpecInternals.java:71) + at grails.gorm.services.multitenancy.partitioned.PartitionMultiTenancySpec.Test partitioned multi-tenancy with GORM services(PartitionMultiTenancySpec.groovy:42) + Caused by: java.lang.IllegalStateException: Either class [grails.gorm.services.multitenancy.partitioned.Book] is not a domain class or GORM has not been initialized correctly or has already been shutdown. Ensure GORM is loaded and configured correctly before calling any methods on a GORM entity. + at org.grails.datastore.gorm.GormEnhancer.stateException(GormEnhancer.groovy:467) + org.grails.datastore.gorm.GormEnhancer.findDatastore(GormEnhancer.groovy:349) + at org.grails.datastore.gorm.GormEnhancer.findTenantId(GormEnhancer.groovy:263) + at org.grails.datastore.gorm.GormEnhancer.findStaticApi(GormEnhancer.groovy:294) + at org.grails.datastore.gorm.GormEntity$Trait$Helper.currentGormStaticApi(GormEntity.groovy:1370) + at org.grails.datastore.gorm.GormEntity$Trait$Helper.count(GormEntity.groovy:649) + at grails.gorm.services.multitenancy.partitioned.PartitionMultiTenancySpec.Test partitioned multi-tenancy with GORM services(PartitionMultiTenancySpec.groovy:39)''') void 'Test partitioned multi-tenancy with GORM services'() { setup: BookService bookService = new BookService() diff --git a/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy b/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy index f625f14df..316fd823d 100644 --- a/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy +++ b/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/dirty/checking/DirtyCheckTransformationSpec.groovy @@ -10,7 +10,6 @@ import spock.lang.Issue /** * @author Graeme Rocher */ -@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106 - The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity and org.grails.datastore.gorm.GormEntity") class DirtyCheckTransformationSpec extends Specification { @Issue('https://github.com/grails/grails-data-mapping/issues/894') void "Test transform doesn't make getters require static compilation"() { @@ -76,7 +75,7 @@ abstract class AbstractGraphDomain { ''') - def child = cls.newInstance() + def child = cls.getDeclaredConstructor().newInstance() then:"The generic types are retained" child != null diff --git a/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/model/TransientInheritanceSpec.groovy b/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/model/TransientInheritanceSpec.groovy index a1049158b..3f998662e 100644 --- a/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/model/TransientInheritanceSpec.groovy +++ b/grails-datastore-gorm/src/test/groovy/org/grails/datastore/gorm/model/TransientInheritanceSpec.groovy @@ -11,7 +11,6 @@ import spock.lang.Specification /** * Created by graemerocher on 03/11/16. */ -@Ignore("https://issues.apache.org/jira/browse/GROOVY-5106 - The interface GormEntity cannot be implemented more than once with different arguments: org.grails.datastore.gorm.GormEntity and org.grails.datastore.gorm.GormEntity") class TransientInheritanceSpec extends Specification { void "test inherit transient config from abstract non-entity parent"() { @@ -29,7 +28,7 @@ class TransientInheritanceSpec extends Specification { static transients = ['bar'] } -// @Entity + @Entity static class Child extends Parent{ String one