From 8f18df8a9c4484e8dcd00ec925dbc752deaf21a5 Mon Sep 17 00:00:00 2001 From: erlholmq Date: Thu, 9 Feb 2017 23:00:47 +0100 Subject: [PATCH] Ignore spock.lang annotations when creating test context cache key See gh-7524 Closes gh-8252 --- .../boot/test/context/ImportsContextCustomizer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-test/src/main/java/org/springframework/boot/test/context/ImportsContextCustomizer.java b/spring-boot-test/src/main/java/org/springframework/boot/test/context/ImportsContextCustomizer.java index 17eea896f9..7c2b914c16 100644 --- a/spring-boot-test/src/main/java/org/springframework/boot/test/context/ImportsContextCustomizer.java +++ b/spring-boot-test/src/main/java/org/springframework/boot/test/context/ImportsContextCustomizer.java @@ -324,8 +324,8 @@ class ImportsContextCustomizer implements ContextCustomizer { @Override public boolean isIgnored(Annotation annotation) { - return annotation.annotationType().getName() - .startsWith("org.spockframework."); + return annotation.annotationType().getName().startsWith("org.spockframework.") || + annotation.annotationType().getName().startsWith("spock."); } }