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
8c2d6b28
Commit
8c2d6b28
authored
Oct 23, 2019
by
Johnny Lim
Committed by
Stephane Nicoll
Oct 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
See gh-18697
parent
ce8360dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
RSocketSecurityAutoConfigurationTests.java
...curity/rsocket/RSocketSecurityAutoConfigurationTests.java
+5
-7
RSocketPortInfoApplicationContextInitializer.java
...context/RSocketPortInfoApplicationContextInitializer.java
+1
-1
BindableTests.java
...framework/boot/context/properties/bind/BindableTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/rsocket/RSocketSecurityAutoConfigurationTests.java
View file @
8c2d6b28
...
...
@@ -16,12 +16,9 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
security
.
rsocket
;
import
java.util.List
;
import
io.rsocket.RSocketFactory
;
import
org.junit.jupiter.api.Test
;
import
org.mockito.ArgumentCaptor
;
import
org.mockito.Mockito
;
import
org.springframework.boot.autoconfigure.AutoConfigurations
;
import
org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration
;
...
...
@@ -34,6 +31,8 @@ import org.springframework.security.config.annotation.rsocket.RSocketSecurity;
import
org.springframework.security.rsocket.core.SecuritySocketAcceptorInterceptor
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
verify
;
/**
* Tests for {@link RSocketSecurityAutoConfiguration}.
...
...
@@ -59,15 +58,14 @@ class RSocketSecurityAutoConfigurationTests {
@Test
void
autoConfigurationAddsCustomizerForServerRSocketFactory
()
{
RSocketFactory
.
ServerRSocketFactory
factory
=
Mockito
.
mock
(
RSocketFactory
.
ServerRSocketFactory
.
class
);
RSocketFactory
.
ServerRSocketFactory
factory
=
mock
(
RSocketFactory
.
ServerRSocketFactory
.
class
);
ArgumentCaptor
<
SecuritySocketAcceptorInterceptor
>
captor
=
ArgumentCaptor
.
forClass
(
SecuritySocketAcceptorInterceptor
.
class
);
this
.
contextRunner
.
run
((
context
)
->
{
ServerRSocketFactoryProcessor
customizer
=
context
.
getBean
(
ServerRSocketFactoryProcessor
.
class
);
customizer
.
process
(
factory
);
Mockito
.
verify
(
factory
).
addSocketAcceptorPlugin
(
captor
.
capture
());
List
<
SecuritySocketAcceptorInterceptor
>
values
=
captor
.
getAllValues
();
assertThat
(
values
.
get
(
0
)).
isInstanceOf
(
SecuritySocketAcceptorInterceptor
.
class
);
verify
(
factory
).
addSocketAcceptorPlugin
(
captor
.
capture
());
assertThat
(
captor
.
getValue
()).
isInstanceOf
(
SecuritySocketAcceptorInterceptor
.
class
);
});
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/context/RSocketPortInfoApplicationContextInitializer.java
View file @
8c2d6b28
...
...
@@ -55,7 +55,7 @@ public class RSocketPortInfoApplicationContextInitializer
private
static
final
String
PROPERTY_NAME
=
"local.rsocket.server.port"
;
private
ConfigurableApplicationContext
applicationContext
;
private
final
ConfigurableApplicationContext
applicationContext
;
Listener
(
ConfigurableApplicationContext
applicationContext
)
{
this
.
applicationContext
=
applicationContext
;
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java
View file @
8c2d6b28
...
...
@@ -170,7 +170,7 @@ class BindableTests {
}
@Test
// gh-18218
void
withSuppliedValue
Value
DoesNotForgetAnnotations
()
{
void
withSuppliedValueDoesNotForgetAnnotations
()
{
Annotation
annotation
=
AnnotationUtils
.
synthesizeAnnotation
(
TestAnnotation
.
class
);
Bindable
<?>
bindable
=
Bindable
.
of
(
String
.
class
).
withAnnotations
(
annotation
).
withSuppliedValue
(()
->
""
);
assertThat
(
bindable
.
getAnnotations
()).
containsExactly
(
annotation
);
...
...
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