Skip to content

Commit e117b74

Browse files
committed
Fix test
1 parent 8127aa6 commit e117b74

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/roomdirectory/RustRoomDirectoryServiceTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
package io.element.android.libraries.matrix.impl.roomdirectory
99

1010
import io.element.android.libraries.matrix.impl.fixtures.fakes.FakeRustClient
11-
import io.element.android.tests.testutils.testCoroutineDispatchers
12-
import kotlinx.coroutines.test.runTest
11+
import io.element.android.tests.testutils.runCancellableScopeTestWithTestScope
12+
import kotlinx.coroutines.test.StandardTestDispatcher
1313
import org.junit.Test
1414

1515
class RustRoomDirectoryServiceTest {
1616
@Test
17-
fun test() = runTest {
17+
fun test() = runCancellableScopeTestWithTestScope { testScope, cancellableScope ->
1818
val client = FakeRustClient()
1919
val sut = RustRoomDirectoryService(
2020
client = client,
21-
sessionDispatcher = testCoroutineDispatchers().io,
21+
sessionDispatcher = StandardTestDispatcher(testScope.testScheduler),
2222
)
23-
sut.createRoomDirectoryList(this)
23+
sut.createRoomDirectoryList(cancellableScope)
2424
}
2525
}

0 commit comments

Comments
 (0)