mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Fix test compilation warning after bump kotlin-gradle-plugin from 1.6.0 to 1.6.21
This commit is contained in:
parent
fe8648c7f8
commit
f54aa60803
2 changed files with 6 additions and 4 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
package org.matrix.android.sdk.internal.task
|
||||
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.asCoroutineDispatcher
|
||||
import kotlinx.coroutines.delay
|
||||
|
@ -31,8 +32,8 @@ class CoroutineSequencersTest : MatrixTest {
|
|||
|
||||
private val dispatcher = Executors.newSingleThreadExecutor().asCoroutineDispatcher()
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
@Test
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
fun sequencer_should_run_sequential() {
|
||||
val sequencer = SemaphoreCoroutineSequencer()
|
||||
val results = ArrayList<String>()
|
||||
|
@ -60,8 +61,8 @@ class CoroutineSequencersTest : MatrixTest {
|
|||
assertEquals(results[2], "#3")
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
@Test
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
fun sequencer_should_run_parallel() {
|
||||
val sequencer1 = SemaphoreCoroutineSequencer()
|
||||
val sequencer2 = SemaphoreCoroutineSequencer()
|
||||
|
@ -87,8 +88,8 @@ class CoroutineSequencersTest : MatrixTest {
|
|||
assertEquals(3, results.size)
|
||||
}
|
||||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
@Test
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
fun sequencer_should_jump_to_next_when_current_job_canceled() {
|
||||
val sequencer = SemaphoreCoroutineSequencer()
|
||||
val results = ArrayList<String>()
|
||||
|
|
|
@ -19,6 +19,7 @@ package im.vector.app
|
|||
import android.net.Uri
|
||||
import androidx.lifecycle.Observer
|
||||
import im.vector.app.ui.robot.OnboardingRobot
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -107,7 +108,7 @@ abstract class VerificationTestBase {
|
|||
return result!!
|
||||
}
|
||||
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
private fun syncSession(session: Session) {
|
||||
val lock = CountDownLatch(1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue