Skip to content

Commit

Permalink
Merge pull request #1835 from grails/test-cleanup
Browse files Browse the repository at this point in the history
test cleanup - fix hibernate6 tests
  • Loading branch information
jamesfredley authored Oct 25, 2024
2 parents 8f1a819 + ea7c95e commit 678b4b9
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ jobs:
repo: grails/gorm-hibernate5
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
- name: Invoke the Java CI workflow in GORM Hibernate6
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/gorm-hibernate6
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
- name: Invoke the Java CI workflow in GORM MongoDB
uses: benc-uk/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,19 @@ return Book.classLoader
}
}

//@Entity
//class Book {
// String title
//}
//
//
//@Service(Book)
//abstract class BookService {
// abstract Observable<Book> find(String title)
//
// Observable<Book> findOne(title) {
// RxServiceSupport.create {
// Book.findWhere(title:title)
// }
// }
//}
@Entity
class Book {
String title
}


@Service(Book)
abstract class BookService {
abstract Observable<Book> find(String title)

Observable<Book> findOne(title) {
RxServiceSupport.create {
Book.findWhere(title:title)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class DirtyCheckingSpec extends GormDatastoreSpec {
TestAuthor.deleteAll()
}

@IgnoreIf({ Boolean.getBoolean("hibernate5.gorm.suite")}) // because one-to-one association loads eagerly in the Hibernate
@IgnoreIf({ Boolean.getBoolean("hibernate5.gorm.suite") || Boolean.getBoolean("hibernate6.gorm.suite")}) // because one-to-one association loads eagerly in the Hibernate
void "test initialized proxy is not marked as dirty"() {

given:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package grails.gorm.services

import grails.gorm.annotation.Entity
import jakarta.validation.constraints.NotNull
import org.grails.datastore.gorm.validation.jakarta.services.ValidatedService
import org.grails.datastore.mapping.validation.ValidationException
import spock.lang.Specification
Expand Down Expand Up @@ -79,12 +81,12 @@ class Foo {
}
}

//@Service(Foo)
//interface MyService {
//
// Foo find(@NotNull String title)
//}
//@Entity
//class Foo {
// String title
//}
@Service(Foo)
interface MyService {

Foo find(@NotNull String title)
}
@Entity
class Foo {
String title
}

0 comments on commit 678b4b9

Please sign in to comment.