Skip to content

Commit

Permalink
Raise await DB connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed Sep 26, 2023
1 parent 6755ff9 commit 90d08cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ actual fun runTest(test: suspend () -> Unit) = kotlinx.coroutines.test.runTest(t
actual annotation class IgnoreForAndroidUnitTest

private suspend fun awaitDatabaseConnection() = withContext(Dispatchers.Default) {
withTimeout(5.seconds) {
withTimeout(2.minutes) {
Firebase.database.reference(".info/connected").valueEvents.first { it.value() }
}
}

0 comments on commit 90d08cf

Please sign in to comment.