Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
a6f443a9
Commit
a6f443a9
authored
Jul 19, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically disable DevTools when running a Cucumber test
Closes gh-6412
parent
e9c69f26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
DefaultRestartInitializer.java
...work/boot/devtools/restart/DefaultRestartInitializer.java
+2
-0
DefaultRestartInitializerTests.java
...boot/devtools/restart/DefaultRestartInitializerTests.java
+6
-0
No files found.
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java
View file @
a6f443a9
...
...
@@ -28,6 +28,7 @@ import java.util.Set;
* exploded) or when running from a test.
*
* @author Phillip Webb
* @author Andy Wilkinson
* @since 1.3.0
*/
public
class
DefaultRestartInitializer
implements
RestartInitializer
{
...
...
@@ -38,6 +39,7 @@ public class DefaultRestartInitializer implements RestartInitializer {
Set
<
String
>
skipped
=
new
LinkedHashSet
<
String
>();
skipped
.
add
(
"org.junit.runners."
);
skipped
.
add
(
"org.springframework.boot.test."
);
skipped
.
add
(
"cucumber.runtime."
);
SKIPPED_STACK_ELEMENTS
=
Collections
.
unmodifiableSet
(
skipped
);
}
...
...
spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/DefaultRestartInitializerTests.java
View file @
a6f443a9
...
...
@@ -27,6 +27,7 @@ import static org.hamcrest.Matchers.nullValue;
* Tests for {@link DefaultRestartInitializer}.
*
* @author Phillip Webb
* @author Andy Wilkinson
*/
public
class
DefaultRestartInitializerTests
{
...
...
@@ -80,6 +81,11 @@ public class DefaultRestartInitializerTests {
testSkipStack
(
"org.springframework.boot.test.Something"
,
true
);
}
@Test
public
void
skipsDueToCucumber
()
throws
Exception
{
testSkipStack
(
"cucumber.runtime.Runtime.run"
,
true
);
}
private
void
testSkipStack
(
String
className
,
boolean
expected
)
{
MockRestartInitializer
initializer
=
new
MockRestartInitializer
(
true
);
StackTraceElement
element
=
new
StackTraceElement
(
className
,
"someMethod"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment