Fix test compilation warning after bump kotlin-gradle-plugin from 1.6.0 to 1.6.21

This commit is contained in:
Benoit Marty 2022-05-10 17:46:59 +02:00
parent f54aa60803
commit a3b6bb3ec3

View File

@ -17,6 +17,7 @@
package org.matrix.android.sdk.internal.task
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.delay
@ -32,7 +33,7 @@ class CoroutineSequencersTest : MatrixTest {
private val dispatcher = Executors.newSingleThreadExecutor().asCoroutineDispatcher()
@OptIn(DelicateCoroutinesApi::class)
@OptIn(DelicateCoroutinesApi::class, ExperimentalCoroutinesApi::class)
@Test
fun sequencer_should_run_sequential() {
val sequencer = SemaphoreCoroutineSequencer()
@ -61,7 +62,7 @@ class CoroutineSequencersTest : MatrixTest {
assertEquals(results[2], "#3")
}
@OptIn(DelicateCoroutinesApi::class)
@OptIn(DelicateCoroutinesApi::class, ExperimentalCoroutinesApi::class)
@Test
fun sequencer_should_run_parallel() {
val sequencer1 = SemaphoreCoroutineSequencer()
@ -88,7 +89,7 @@ class CoroutineSequencersTest : MatrixTest {
assertEquals(3, results.size)
}
@OptIn(DelicateCoroutinesApi::class)
@OptIn(DelicateCoroutinesApi::class, ExperimentalCoroutinesApi::class)
@Test
fun sequencer_should_jump_to_next_when_current_job_canceled() {
val sequencer = SemaphoreCoroutineSequencer()