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
3fc51f80
Commit
3fc51f80
authored
Oct 14, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Isolate the effects of initializing Reactor's debug agent in the tests
parent
e7efe0cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
pom.xml
spring-boot-project/spring-boot/pom.xml
+0
-5
DebugAgentEnvironmentPostProcessor.java
...work/boot/reactor/DebugAgentEnvironmentPostProcessor.java
+7
-3
DebugAgentEnvironmentPostProcessorTests.java
...boot/reactor/DebugAgentEnvironmentPostProcessorTests.java
+2
-0
No files found.
spring-boot-project/spring-boot/pom.xml
View file @
3fc51f80
...
...
@@ -86,11 +86,6 @@
<artifactId>
reactor-netty
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-tools
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
io.netty
</groupId>
<artifactId>
netty-tcnative-boringssl-static
</artifactId>
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/reactor/DebugAgentEnvironmentPostProcessor.java
View file @
3fc51f80
...
...
@@ -16,8 +16,6 @@
package
org
.
springframework
.
boot
.
reactor
;
import
reactor.tools.agent.ReactorDebugAgent
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.env.EnvironmentPostProcessor
;
import
org.springframework.core.Ordered
;
...
...
@@ -46,7 +44,13 @@ public class DebugAgentEnvironmentPostProcessor implements EnvironmentPostProces
if
(
ClassUtils
.
isPresent
(
REACTOR_DEBUGAGENT_CLASS
,
null
))
{
Boolean
agentEnabled
=
environment
.
getProperty
(
DEBUGAGENT_ENABLED_CONFIG_KEY
,
Boolean
.
class
);
if
(
agentEnabled
!=
Boolean
.
FALSE
)
{
ReactorDebugAgent
.
init
();
try
{
Class
<?>
debugAgent
=
Class
.
forName
(
REACTOR_DEBUGAGENT_CLASS
);
debugAgent
.
getMethod
(
"init"
).
invoke
(
null
);
}
catch
(
Exception
ex
)
{
throw
new
RuntimeException
(
"Failed to init Reactor's debug agent"
);
}
}
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/reactor/DebugAgentEnvironmentPostProcessorTests.java
View file @
3fc51f80
...
...
@@ -20,6 +20,7 @@ import org.junit.jupiter.api.Test;
import
reactor.core.Scannable
;
import
reactor.core.publisher.Flux
;
import
org.springframework.boot.testsupport.classpath.ClassPathOverrides
;
import
org.springframework.mock.env.MockEnvironment
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
...
@@ -29,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Brian Clozel
*/
@ClassPathOverrides
(
"io.projectreactor:reactor-tools:3.3.0.RELEASE"
)
class
DebugAgentEnvironmentPostProcessorTests
{
static
{
...
...
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