From 7181e7613576a744ba3247095821a0bf5bbb9018 Mon Sep 17 00:00:00 2001 From: michal Date: Sun, 21 Oct 2018 01:11:11 +0200 Subject: [PATCH 1/2] Skip restarter for JUnit5 See gh-14915 --- .../boot/devtools/restart/DefaultRestartInitializer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java index 3526a02420..d9bf512180 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java @@ -37,6 +37,7 @@ public class DefaultRestartInitializer implements RestartInitializer { static { Set skipped = new LinkedHashSet<>(); skipped.add("org.junit.runners."); + skipped.add("org.junit.platform."); skipped.add("org.springframework.boot.test."); skipped.add("cucumber.runtime."); SKIPPED_STACK_ELEMENTS = Collections.unmodifiableSet(skipped); From 5f24af6c3c27a02ac6c20394875994e95f5fcb62 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Tue, 23 Oct 2018 13:51:13 -0700 Subject: [PATCH 2/2] Polish Closes gh-14915 --- .../devtools/restart/DefaultRestartInitializerTests.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java index ba8bb8e374..cd145725de 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java @@ -36,6 +36,11 @@ public class DefaultRestartInitializerTests { testSkippedStacks("org.junit.runners.Something"); } + @Test + public void jUnit5StackShouldReturnNull() { + testSkippedStacks("org.junit.platform.Something"); + } + @Test public void springTestStackShouldReturnNull() { testSkippedStacks("org.springframework.boot.test.Something");