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
76faf31f
Commit
76faf31f
authored
Sep 30, 2019
by
Brian Clozel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RSocket smoke test
parent
0791f56e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
210 additions
and
0 deletions
+210
-0
pom.xml
spring-boot-tests/spring-boot-smoke-tests/pom.xml
+1
-0
pom.xml
...g-boot-smoke-tests/spring-boot-smoke-test-rsocket/pom.xml
+59
-0
Project.java
...test-rsocket/src/main/java/smoketest/rsocket/Project.java
+38
-0
ProjectController.java
...et/src/main/java/smoketest/rsocket/ProjectController.java
+33
-0
SampleRSocketApplication.java
...main/java/smoketest/rsocket/SampleRSocketApplication.java
+29
-0
application.properties
...ke-test-rsocket/src/main/resources/application.properties
+1
-0
SampleRSocketApplicationTests.java
...java/smoketest/rsocket/SampleRSocketApplicationTests.java
+49
-0
No files found.
spring-boot-tests/spring-boot-smoke-tests/pom.xml
View file @
76faf31f
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
<module>
spring-boot-smoke-test-quartz
</module>
<module>
spring-boot-smoke-test-quartz
</module>
<module>
spring-boot-smoke-test-reactive-oauth2-client
</module>
<module>
spring-boot-smoke-test-reactive-oauth2-client
</module>
<module>
spring-boot-smoke-test-reactive-oauth2-resource-server
</module>
<module>
spring-boot-smoke-test-reactive-oauth2-resource-server
</module>
<module>
spring-boot-smoke-test-rsocket
</module>
<module>
spring-boot-smoke-test-secure
</module>
<module>
spring-boot-smoke-test-secure
</module>
<module>
spring-boot-smoke-test-secure-jersey
</module>
<module>
spring-boot-smoke-test-secure-jersey
</module>
<module>
spring-boot-smoke-test-secure-webflux
</module>
<module>
spring-boot-smoke-test-secure-webflux
</module>
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/pom.xml
0 → 100644
View file @
76faf31f
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2012-2019 the original author or authors.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-smoke-tests
</artifactId>
<version>
${revision}
</version>
</parent>
<artifactId>
spring-boot-smoke-test-rsocket
</artifactId>
<name>
Spring Boot RSocket Smoke Test
</name>
<description>
Spring Boot RSocket Smoke Test
</description>
<properties>
<main.basedir>
${basedir}/../../..
</main.basedir>
<m2eclipse.wtp.contextRoot>
/
</m2eclipse.wtp.contextRoot>
</properties>
<dependencies>
<!-- Compile -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-rsocket
</artifactId>
</dependency>
<!-- Test -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
io.projectreactor
</groupId>
<artifactId>
reactor-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/main/java/smoketest/rsocket/Project.java
0 → 100644
View file @
76faf31f
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
rsocket
;
public
class
Project
{
private
String
name
;
public
Project
()
{
}
public
Project
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/main/java/smoketest/rsocket/ProjectController.java
0 → 100644
View file @
76faf31f
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
rsocket
;
import
reactor.core.publisher.Mono
;
import
org.springframework.messaging.handler.annotation.DestinationVariable
;
import
org.springframework.messaging.handler.annotation.MessageMapping
;
import
org.springframework.stereotype.Controller
;
@Controller
public
class
ProjectController
{
@MessageMapping
(
"find.project.{name}"
)
public
Mono
<
Project
>
findProject
(
@DestinationVariable
String
name
)
{
return
Mono
.
just
(
new
Project
(
name
));
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/main/java/smoketest/rsocket/SampleRSocketApplication.java
0 → 100644
View file @
76faf31f
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
rsocket
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
SampleRSocketApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
SampleRSocketApplication
.
class
,
args
);
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/main/resources/application.properties
0 → 100644
View file @
76faf31f
spring.rsocket.server.port
=
0
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-rsocket/src/test/java/smoketest/rsocket/SampleRSocketApplicationTests.java
0 → 100644
View file @
76faf31f
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
rsocket
;
import
java.time.Duration
;
import
org.assertj.core.api.Assertions
;
import
org.junit.jupiter.api.Test
;
import
reactor.core.publisher.Mono
;
import
reactor.test.StepVerifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.rsocket.context.LocalRSocketServerPort
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.messaging.rsocket.RSocketRequester
;
@SpringBootTest
(
properties
=
"spring.rsocket.server.port=0"
)
public
class
SampleRSocketApplicationTests
{
@LocalRSocketServerPort
private
int
port
;
@Autowired
private
RSocketRequester
.
Builder
builder
;
@Test
void
testRSocketEndpoint
()
{
RSocketRequester
requester
=
this
.
builder
.
connectTcp
(
"localhost"
,
this
.
port
).
block
(
Duration
.
ofSeconds
(
5
));
Mono
<
Project
>
result
=
requester
.
route
(
"find.project.spring-boot"
).
retrieveMono
(
Project
.
class
);
StepVerifier
.
create
(
result
)
.
assertNext
((
project
)
->
Assertions
.
assertThat
(
project
.
getName
()).
isEqualTo
(
"spring-boot"
))
.
verifyComplete
();
}
}
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