Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
fix test for jpa
Browse files Browse the repository at this point in the history
  • Loading branch information
sarmbruster committed Aug 13, 2013
1 parent 6b73f8d commit fb19e9a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ class UniqueConstraintSpec extends GormDatastoreSpec {
setup:
def constraint = new UniqueConstraint(session.datastore)
constraint.owningClass = UniqueGroup
def origFlushMode = session.flushMode

when: "check if session flushmode has really switched to COMMIT"
constraint.withManualFlushMode {
assert session.flushMode == FlushModeType.COMMIT
constraint.withManualFlushMode { s->
assert s.flushMode == FlushModeType.COMMIT
}

then:
session.flushMode == FlushModeType.AUTO
session.flushMode == origFlushMode
}

protected void setupValidator() {
Expand Down

0 comments on commit fb19e9a

Please sign in to comment.