Skip to content

Commit 41fe4b9

Browse files
committed
remove 1 thread
1 parent 510467e commit 41fe4b9

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

core-kotlin-modules/core-kotlin-collections-6/src/test/kotlin/com/baeldung/parallelOperationsCollections/ParallelOperationCollectionsUnitTest.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -142,23 +142,6 @@ class ParallelOperationCollectionsUnitTest {
142142
observable.assertResultsTrue()
143143
}
144144

145-
@Test
146-
fun `using RxKotlin but still use 1 thread`() { // ObservableKt.kt.class from io.reactivex.rxkotlin
147-
logger.info("Using RxKotlin 1 thread")
148-
val startTime = Instant.now()
149-
150-
val observable = people.toObservable()
151-
.subscribeOn(Schedulers.io())
152-
.flatMap { Observable.just(it) } // Without using the maxConcurrency parameter, so it only uses 1 thread.
153-
.doOnNext { person -> person.setAdult() }
154-
.filter { it.age > 15 }.toList()
155-
.map { it.sortedBy { person -> person.age } }.blockingGet()
156-
157-
startTime.printTotalTime()
158-
159-
observable.assertResultsTrue()
160-
}
161-
162145
@Test
163146
fun `using parallelStream()`() {
164147
logger.info("Using Stream API")

0 commit comments

Comments
 (0)