Skip to content

Commit 5a32881

Browse files
committed
test(android): Restore the executor before teardown
The rejecting executor is shared through the options, and teardown closes the provider through it, so leaving it rejecting skipped clearing the static connectivity manager for later tests.
1 parent 663a626 commit 5a32881

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎sentry-android-core/src/test/java/io/sentry/android/core/internal/util/AndroidConnectionStatusProviderTest.kt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ class AndroidConnectionStatusProviderTest {
290290

291291
captor.firstValue.execute {}
292292

293+
// Cleanup runs through the same executor, and connectivityManager is static, so a still
294+
// rejecting executor would leak a stale manager into later tests.
295+
executor.reject = false
293296
provider.close()
294297
}
295298

0 commit comments

Comments
 (0)