Skip to content

Commit

Permalink
Merge branch 'oppia:develop' into migrate-onBackPressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tejas-67 authored Jun 21, 2024
2 parents 9390eef + 14976d9 commit dc0fd1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class NetworkLoggingInterceptorTest {
val firstRequestsDeferred = CoroutineScope(backgroundTestDispatcher).async {
networkLoggingInterceptor.logNetworkCallFlow.take(1).toList()
}
testCoroutineDispatchers.advanceUntilIdle() // Ensure the flow is subscribed before emit().
client.newCall(request).execute()
testCoroutineDispatchers.advanceUntilIdle()

Expand All @@ -116,6 +117,7 @@ class NetworkLoggingInterceptorTest {
networkLoggingInterceptor.logFailedNetworkCallFlow.take(1).toList()
}
mockWebServer.enqueue(mockResponse)
testCoroutineDispatchers.advanceUntilIdle() // Ensure the flow is subscribed before emit().
client.newCall(request).execute()
testCoroutineDispatchers.advanceUntilIdle()

Expand All @@ -141,6 +143,7 @@ class NetworkLoggingInterceptorTest {
val firstFailingRequestsDeferred = CoroutineScope(backgroundTestDispatcher).async {
networkLoggingInterceptor.logFailedNetworkCallFlow.take(1).toList()
}
testCoroutineDispatchers.advanceUntilIdle() // Ensure the flow is subscribed before emit().
try {
client.newCall(request).execute()
} catch (e: ConnectException) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class ConsoleLoggerTest {
val firstErrorContextsDeferred = CoroutineScope(backgroundTestDispatcher).async {
consoleLogger.logErrorMessagesFlow.take(1).toList()
}

testCoroutineDispatchers.advanceUntilIdle() // Ensure the flow is subscribed before emit().
consoleLogger.e(testTag, testMessage)
testCoroutineDispatchers.advanceUntilIdle()

Expand Down

0 comments on commit dc0fd1f

Please sign in to comment.