Skip to content

Commit 955fdca

Browse files
committed
Fix room tests
1 parent 2092d78 commit 955fdca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

integrations/room/src/commonMain/kotlin/com/powersync/integrations/room/RoomConnectionPool.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ private class RoomTransactionLease(
161161
transactor.usePrepared(sql) {
162162
// TODO: This is suspending in Room3, where we can avoid the runBlocking here.
163163
stmt ->
164-
runBlocking(context) { block(stmt) }
164+
// Don't use the context here, Room2 does that for us. We're not allowed to use the
165+
// connection from different threads.
166+
runBlocking { block(stmt) }
165167
}
166168

167169
override fun isInTransactionSync(): Boolean =

0 commit comments

Comments
 (0)