Skip to content

Commit e4020e7

Browse files
Merge branch '1.3.x' of github.com:grails/grails-core into 1.3.x
2 parents 582d331 + 45d4a33 commit e4020e7

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)