File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
kotlin-libraries-http/src/test/kotlin/com/baeldung/fuel
spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/handlers Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ internal class FuelHttpLiveTest {
24
24
val latch = CountDownLatch (1 )
25
25
26
26
" http://httpbin.org/get" .httpGet().response{
27
- _, response, result ->
27
+ _, response, result ->
28
28
29
29
val (data, error) = result
30
30
@@ -71,7 +71,7 @@ internal class FuelHttpLiveTest {
71
71
val latch = CountDownLatch (1 )
72
72
73
73
Fuel .post(" http://httpbin.org/post" ).response{
74
- _, response, result ->
74
+ _, response, result ->
75
75
76
76
val (data, error) = result
77
77
@@ -151,8 +151,7 @@ internal class FuelHttpLiveTest {
151
151
152
152
Fuel .download(" http://httpbin.org/bytes/32768" ).fileDestination { _, _ ->
153
153
File .createTempFile(" temp" , " .tmp" )
154
- }.response{
155
- _, response, result ->
154
+ }.response{ _, response, result ->
156
155
157
156
val (data, error) = result
158
157
Assertions .assertNull(error)
@@ -254,7 +253,7 @@ internal class FuelHttpLiveTest {
254
253
255
254
Fuel .request(PostRoutingAPI .Post (" 1" ,null ))
256
255
.responseObject(Post .Deserializer ()) {
257
- _, _, result ->
256
+ _, _, result ->
258
257
Assertions .assertEquals(1 , result.component1()?.get(0 )?.userId)
259
258
latch.countDown()
260
259
}
Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ package com.baeldung.nonblockingcoroutines.handlers
3
3
import com.baeldung.nonblockingcoroutines.controller.ProductStockView
4
4
import com.baeldung.nonblockingcoroutines.model.Product
5
5
import com.baeldung.nonblockingcoroutines.repository.ProductRepositoryCoroutines
6
- import kotlinx.coroutines.*
6
+ import kotlinx.coroutines.DelicateCoroutinesApi
7
+ import kotlinx.coroutines.FlowPreview
8
+ import kotlinx.coroutines.GlobalScope
9
+ import kotlinx.coroutines.async
10
+ import kotlinx.coroutines.Deferred
7
11
import org.springframework.beans.factory.annotation.Autowired
8
12
import org.springframework.http.MediaType
9
13
import org.springframework.stereotype.Component
You can’t perform that action at this time.
0 commit comments