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
78d2578c
Commit
78d2578c
authored
Jul 31, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Add WebFlux Coroutines smoke test"
See gh-17701
parent
69f3fe7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
14 deletions
+12
-14
pom.xml
...e-tests/spring-boot-smoke-test-webflux-coroutines/pom.xml
+6
-11
CoroutinesController.kt
.../main/kotlin/smoketest/coroutines/CoroutinesController.kt
+1
-0
SampleCoroutinesApplication.kt
...otlin/smoketest/coroutines/SampleCoroutinesApplication.kt
+3
-2
CoroutinesControllerTests.kt
.../kotlin/smoketest/coroutines/CoroutinesControllerTests.kt
+2
-1
No files found.
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webflux-coroutines/pom.xml
View file @
78d2578c
...
@@ -21,10 +21,7 @@
...
@@ -21,10 +21,7 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-webflux
</artifactId>
<artifactId>
spring-boot-starter-webflux
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.module
</groupId>
<artifactId>
jackson-module-kotlin
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-reflect
</artifactId>
<artifactId>
kotlin-reflect
</artifactId>
...
@@ -37,6 +34,11 @@
...
@@ -37,6 +34,11 @@
<groupId>
org.jetbrains.kotlinx
</groupId>
<groupId>
org.jetbrains.kotlinx
</groupId>
<artifactId>
kotlinx-coroutines-reactor
</artifactId>
<artifactId>
kotlinx-coroutines-reactor
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.module
</groupId>
<artifactId>
jackson-module-kotlin
</artifactId>
</dependency>
<!-- Test -->
<!-- Test -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -71,13 +73,6 @@
...
@@ -71,13 +73,6 @@
</dependency>
</dependency>
</dependencies>
</dependencies>
</plugin>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<configuration>
<useSystemClassLoader>
false
</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</plugins>
</build>
</build>
</project>
</project>
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webflux-coroutines/src/main/kotlin/smoketest/coroutines/CoroutinesController.kt
View file @
78d2578c
...
@@ -21,4 +21,5 @@ class CoroutinesController {
...
@@ -21,4 +21,5 @@ class CoroutinesController {
delay
(
10
)
delay
(
10
)
emit
(
"World"
)
emit
(
"World"
)
}
}
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webflux-coroutines/src/main/kotlin/smoketest/coroutines/CoroutinesApplication.kt
→
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webflux-coroutines/src/main/kotlin/smoketest/coroutines/
Sample
CoroutinesApplication.kt
View file @
78d2578c
...
@@ -4,7 +4,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
...
@@ -4,7 +4,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
import
org.springframework.boot.runApplication
import
org.springframework.boot.runApplication
@SpringBootApplication
@SpringBootApplication
class
CoroutinesApplication
class
Sample
CoroutinesApplication
fun
main
(
args
:
Array
<
String
>)
{
fun
main
(
args
:
Array
<
String
>)
{
runApplication
<
CoroutinesApplication
>(*
args
)
runApplication
<
SampleCoroutinesApplication
>(*
args
)
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webflux-coroutines/src/test/kotlin/smoketest/coroutines/Coroutines
Application
Tests.kt
→
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-webflux-coroutines/src/test/kotlin/smoketest/coroutines/Coroutines
Controller
Tests.kt
View file @
78d2578c
...
@@ -9,7 +9,7 @@ import org.springframework.test.web.reactive.server.WebTestClient
...
@@ -9,7 +9,7 @@ import org.springframework.test.web.reactive.server.WebTestClient
import
org.springframework.test.web.reactive.server.expectBody
import
org.springframework.test.web.reactive.server.expectBody
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
@SpringBootTest
(
webEnvironment
=
WebEnvironment
.
RANDOM_PORT
)
class
Coroutines
Application
Tests
(
@Autowired
private
val
webClient
:
WebTestClient
)
{
class
Coroutines
Controller
Tests
(
@Autowired
private
val
webClient
:
WebTestClient
)
{
@Test
@Test
fun
testSuspendingFunction
()
{
fun
testSuspendingFunction
()
{
...
@@ -22,4 +22,5 @@ class CoroutinesApplicationTests(@Autowired private val webClient: WebTestClient
...
@@ -22,4 +22,5 @@ class CoroutinesApplicationTests(@Autowired private val webClient: WebTestClient
webClient
.
get
().
uri
(
"/flow"
).
accept
(
MediaType
.
TEXT_PLAIN
).
exchange
()
webClient
.
get
().
uri
(
"/flow"
).
accept
(
MediaType
.
TEXT_PLAIN
).
exchange
()
.
expectBody
<
String
>().
isEqualTo
(
"Hello World"
)
.
expectBody
<
String
>().
isEqualTo
(
"Hello World"
)
}
}
}
}
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