Polish "Add WebFlux Coroutines smoke test"

See gh-17701
pull/17742/head
Stephane Nicoll 5 years ago
parent 69f3fe7a9c
commit 78d2578c78

@ -21,10 +21,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
@ -37,6 +34,11 @@
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-reactor</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -71,13 +73,6 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -4,7 +4,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class CoroutinesApplication
class SampleCoroutinesApplication
fun main(args: Array<String>) {
runApplication<CoroutinesApplication>(*args)
runApplication<SampleCoroutinesApplication>(*args)
}

@ -9,7 +9,7 @@ import org.springframework.test.web.reactive.server.WebTestClient
import org.springframework.test.web.reactive.server.expectBody
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
class CoroutinesApplicationTests(@Autowired private val webClient: WebTestClient) {
class CoroutinesControllerTests(@Autowired private val webClient: WebTestClient) {
@Test
fun testSuspendingFunction() {
@ -22,4 +22,5 @@ class CoroutinesApplicationTests(@Autowired private val webClient: WebTestClient
webClient.get().uri("/flow").accept(MediaType.TEXT_PLAIN).exchange()
.expectBody<String>().isEqualTo("Hello World")
}
}
Loading…
Cancel
Save