From 23596fe19f41207acb643799100728cc98f0feea Mon Sep 17 00:00:00 2001 From: Nathan Dunn Date: Wed, 3 Jun 2020 13:09:09 -0700 Subject: [PATCH] harness should be runtime is being used during runtime, for spring class transaction not provided --- examples/grails3-neo4j-hibernate/build.gradle | 2 +- .../controllers/functional/tests/BookController.groovy | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/grails3-neo4j-hibernate/build.gradle b/examples/grails3-neo4j-hibernate/build.gradle index 201a5fe1..0b90c16a 100644 --- a/examples/grails3-neo4j-hibernate/build.gradle +++ b/examples/grails3-neo4j-hibernate/build.gradle @@ -45,7 +45,7 @@ dependencies { testCompile "org.seleniumhq.selenium:selenium-api:$seleniumVersion" testCompile "org.seleniumhq.selenium:selenium-support:$seleniumVersion" - testRuntime "org.neo4j.test:neo4j-harness:$neo4jVersion" + runtime "org.neo4j.test:neo4j-harness:$neo4jVersion" } webdriverBinaries { chromedriver "$chromeDriverVersion" diff --git a/examples/grails3-neo4j/grails-app/controllers/functional/tests/BookController.groovy b/examples/grails3-neo4j/grails-app/controllers/functional/tests/BookController.groovy index 6711401d..85c6465c 100644 --- a/examples/grails3-neo4j/grails-app/controllers/functional/tests/BookController.groovy +++ b/examples/grails3-neo4j/grails-app/controllers/functional/tests/BookController.groovy @@ -38,7 +38,9 @@ class BookController { return } - book.save flush:true + Book.withTransaction { + book.save flush:true + } request.withFormat { form multipartForm {