Skip to content

Commit c8e6a6e

Browse files
committed
fix tests
1 parent ead3f38 commit c8e6a6e

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

sentry-android-core/src/test/java/io/sentry/android/core/InternalSentrySdkTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ class InternalSentrySdkTest {
241241
Sentry.configureScope { scope ->
242242
assertEquals(3, scope.breadcrumbs.size)
243243
}
244+
245+
// Ensure we don't interfere with other tests
246+
Sentry.configureScope(ScopeType.GLOBAL) { scope -> scope.clear() }
244247
}
245248

246249
@Test

sentry-android-core/src/test/java/io/sentry/android/core/SentryLogcatAdapterTest.kt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,13 @@ class SentryLogcatAdapterTest {
5050

5151
private val fixture = Fixture()
5252

53-
@BeforeTest
54-
fun `set up`() {
55-
Sentry.close()
56-
AppStartMetrics.getInstance().clear()
57-
ContextUtils.resetInstance()
58-
fixture.breadcrumbs.clear()
59-
fixture.logs.clear()
60-
}
61-
6253
@AfterTest
6354
fun `clean up`() {
6455
AppStartMetrics.getInstance().clear()
6556
ContextUtils.resetInstance()
6657
Sentry.close()
58+
fixture.breadcrumbs.clear()
59+
fixture.logs.clear()
6760
}
6861

6962
@Test

0 commit comments

Comments
 (0)