test(#1163): subscribe before sending dedup frames
This commit is contained in:
1 parent
ac180ba5df
commit
287f3c1561
1 file changed
+4
-1
@@ -1671,7 +1671,10 @@ class HermesWsClientTest {
|
||||
val tokenALatch = CountDownLatch(1)
|
||||
val tokenBLatch = CountDownLatch(1)
|
||||
val collectorJob =
|
||||
kotlinx.coroutines.CoroutineScope(kotlinx.coroutines.Dispatchers.IO).launch {
|
||||
// Subscribe before sending A: this SharedFlow does not replay missed tokens (#1163).
|
||||
kotlinx.coroutines.CoroutineScope(kotlinx.coroutines.Dispatchers.IO).launch(
|
||||
start = kotlinx.coroutines.CoroutineStart.UNDISPATCHED,
|
||||
) {
|
||||
HermesWsClient.events.collect { event ->
|
||||
if (event is WsEvent.MessageToken) {
|
||||
receivedTokens.add(event.token)
|
||||
|
||||
Reference in new issue
Block a user