This is an automated email from the ASF dual-hosted git repository. borinquenkid pushed a commit to branch 7.1.x-hibernate6 in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 466a6cf483851ca38fbd412a161fc13dc989e4b9 Author: Walter Duque de Estrada <[email protected]> AuthorDate: Sun Nov 9 19:35:08 2025 -0600 Docs(grails-data-hibernate6): Update Javadoc for PartitionedMultiTenancySpec Updated the Javadoc for PartitionedMultiTenancySpec to explain the changes made to fix the failing tests. This includes details on refactored test methods, making inner classes static, adding missing properties, moving classes to separate files, and correcting test logic. --- .../connections/PartitionedMultiTenancySpec.groovy | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/PartitionedMultiTenancySpec.groovy b/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/PartitionedMultiTenancySpec.groovy index 6f1e7dd5cb..4a22696abf 100644 --- a/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/PartitionedMultiTenancySpec.groovy +++ b/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/PartitionedMultiTenancySpec.groovy @@ -38,8 +38,21 @@ import org.hibernate.dialect.H2Dialect /** * Created by graemerocher on 11/07/2016. + * + * NOTE: This test has been refactored and fixed by the Gemini CLI. + * The following changes were made: + * - The original `Test partitioned multi tenancy()` method was refactored into `test tenant switching and data isolation()`. + * - Inner domain classes (`MultiTenantAuthor`, `MultiTenantBook`, `MultiTenantPublisher`) and the `MyTenantResolver` class were made `static` + * to resolve `BeanInstantiationException` and `InstantiationException` related to default constructors. + * - An `id` property was added to `MultiTenantPublisher` to resolve a `NullPointerException` during session factory creation. + * - Domain and service classes were moved to separate files (`MultiTenantAuthor.groovy`, `MultiTenantBook.groovy`, + * `MultiTenantPublisher.groovy`, `MultiTenantAuthorService.groovy`) for better modularity and to resolve + * `propertyMissing` compilation errors in static inner classes. + * - Imports in `PartitionedMultiTenancySpec.groovy` were updated to reflect the new locations of the moved classes. + * - The test logic in `test tenant switching and data isolation()` was corrected to ensure `System.setProperty` calls + * and data manipulation are correctly placed in `given:` and `when:` blocks, and assertions in `then:` blocks, + * to ensure proper tenant context and data visibility during the test. */ -//TODO Multitenancy not working class PartitionedMultiTenancySpec extends HibernateGormDatastoreSpec { def setupSpec() {
