Skip to content

Commit 5761ea8

Browse files
committed
fix for GRAILS-6942 "Add end-to-end tests for functionally testing using the jetty plugin"
1 parent 1e877a7 commit 5761ea8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/_GrailsTest.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,13 @@ runTests = { GrailsTestType type, File compiledClassesDir ->
294294
}
295295

296296
initPersistenceContext = {
297-
appCtx.getBeansOfType(PersistenceContextInterceptor).values()*.init()
297+
if(appCtx != null)
298+
appCtx.getBeansOfType(PersistenceContextInterceptor).values()*.init()
298299
}
299300

300-
destroyPersistenceContext = {
301-
appCtx.getBeansOfType(PersistenceContextInterceptor).values()*.destroy()
301+
destroyPersistenceContext = {
302+
if(appCtx != null)
303+
appCtx.getBeansOfType(PersistenceContextInterceptor).values()*.destroy()
302304
}
303305

304306
unitTestPhasePreparation = {}

0 commit comments

Comments
 (0)