mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-10 12:10:10 +08:00
Fix test
This commit is contained in:
parent
1c57e122e0
commit
0376bc6002
@ -21,23 +21,6 @@ import kotlin.test.assertFailsWith
|
|||||||
|
|
||||||
internal class SubscribingGetTest {
|
internal class SubscribingGetTest {
|
||||||
|
|
||||||
@Test
|
|
||||||
fun testSyncFromEvent() {
|
|
||||||
runBlockingWithTimeout(30_000) {
|
|
||||||
suspendCancellableCoroutine<Unit> { cont ->
|
|
||||||
launch {
|
|
||||||
syncFromEvent(20_000) { _: TestEvent ->
|
|
||||||
cont.resume(Unit)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
launch {
|
|
||||||
delay(5_000)
|
|
||||||
TestEvent().broadcast()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testSyncFromEventTimeout() {
|
fun testSyncFromEventTimeout() {
|
||||||
runBlockingWithTimeout(500) {
|
runBlockingWithTimeout(500) {
|
||||||
|
Loading…
Reference in New Issue
Block a user