aboutsummaryrefslogtreecommitdiff
path: root/app/src/test/kotlin/com
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/test/kotlin/com')
-rw-r--r--app/src/test/kotlin/com/pitchedapps/frost/MiscTest.kt35
1 files changed, 0 insertions, 35 deletions
diff --git a/app/src/test/kotlin/com/pitchedapps/frost/MiscTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/MiscTest.kt
index 2676e37d..20610b2a 100644
--- a/app/src/test/kotlin/com/pitchedapps/frost/MiscTest.kt
+++ b/app/src/test/kotlin/com/pitchedapps/frost/MiscTest.kt
@@ -17,15 +17,7 @@
package com.pitchedapps.frost
import com.pitchedapps.frost.facebook.requests.zip
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.asCoroutineDispatcher
-import kotlinx.coroutines.channels.BroadcastChannel
-import kotlinx.coroutines.delay
-import kotlinx.coroutines.launch
-import kotlinx.coroutines.runBlocking
import org.junit.Test
-import java.util.concurrent.Executors
import kotlin.test.assertTrue
/**
@@ -53,31 +45,4 @@ class MiscTest {
"zip did not seem to work on different threads"
)
}
-
-@Test
-@UseExperimental(ExperimentalCoroutinesApi::class)
-fun channel() {
- val c = BroadcastChannel<Int>(100)
- runBlocking {
- launch(Dispatchers.IO) {
- println("1 start ${Thread.currentThread()}")
- for (i in c.openSubscription()) {
- println("1 $i")
- }
- println("1 end ${Thread.currentThread()}")
- }
- launch(Dispatchers.IO) {
- println("2 start ${Thread.currentThread()}")
- for (i in c.openSubscription()) {
- println("2 $i")
- }
- println("2 end ${Thread.currentThread()}")
- }
- c.send(1)
- c.send(2)
- c.send(3)
- delay(1000)
- c.close()
- }
-}
}