You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/BroadcastChannelMultiReceiveStressTest.kt
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ import org.junit.Test
23
23
importorg.junit.runner.RunWith
24
24
importorg.junit.runners.Parameterized
25
25
importjava.util.concurrent.TimeUnit
26
-
importjava.util.concurrent.atomic.AtomicInteger
26
+
importjava.util.concurrent.atomic.AtomicLong
27
27
28
28
/**
29
29
* Tests delivery of events to multiple broadcast channel subscribers.
@@ -42,13 +42,13 @@ class BroadcastChannelMultiReceiveStressTest(
42
42
privateval nReceivers =if (isStressTest) 10else5
43
43
privateval nSeconds =5* stressTestMultiplier
44
44
45
-
privateval broadcast = kind.create()
45
+
privateval broadcast = kind.create<Long>()
46
46
privateval pool = newFixedThreadPoolContext(nReceivers +1, "BroadcastChannelMultiReceiveStressTest")
Copy file name to clipboardExpand all lines: core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/BroadcastChannelSubStressTest.kt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ import org.junit.Test
21
21
importorg.junit.runner.RunWith
22
22
importorg.junit.runners.Parameterized
23
23
importjava.util.concurrent.TimeUnit
24
-
importjava.util.concurrent.atomic.AtomicInteger
24
+
importjava.util.concurrent.atomic.AtomicLong
25
25
26
26
/**
27
27
* Creates a broadcast channel and repeatedly opens new subscription, receives event, closes it,
@@ -40,10 +40,10 @@ class BroadcastChannelSubStressTest(
40
40
}
41
41
42
42
privateval nSeconds =5* stressTestMultiplier
43
-
privateval broadcast = kind.create()
43
+
privateval broadcast = kind.create<Long>()
44
44
45
-
privateval sentTotal =AtomicInteger()
46
-
privateval receivedTotal =AtomicInteger()
45
+
privateval sentTotal =AtomicLong()
46
+
privateval receivedTotal =AtomicLong()
47
47
48
48
@Test
49
49
funtestStress() = runBlocking {
@@ -56,7 +56,7 @@ class BroadcastChannelSubStressTest(
Copy file name to clipboardExpand all lines: core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/TestBroadcastChannelKind.kt
0 commit comments