Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ class ActivityLifecycleIntegrationTest {
}

@Test
@Config(sdk = [Build.VERSION_CODES.M])
fun `onHeadlessAppStart creates standalone App Start transaction on API 23`() {
@Config(sdk = [Build.VERSION_CODES.N])
fun `onHeadlessAppStart creates standalone App Start transaction on API 24`() {
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,31 +370,31 @@ class AndroidOptionsInitializerTest {
assertTrue(fixture.sentryOptions.transportGate is AndroidTransportGate)
}

@Config(sdk = [Build.VERSION_CODES.N_MR1])
@Config(sdk = [Build.VERSION_CODES.N])
@Test
fun `init on API 25 and lower sets SSLSocketFactory with bundled Sentry root CAs`() {
fixture.initSut(configureOptions = { dsn = SAAS_DSN })

assertIs<SentryRootCaSslSocketFactory>(fixture.sentryOptions.sslSocketFactory)
}

@Config(sdk = [Build.VERSION_CODES.N_MR1])
@Config(sdk = [Build.VERSION_CODES.N])
@Test
fun `init on API 25 and lower does not set SSLSocketFactory for self-hosted DSN`() {
fixture.initSut(configureOptions = { dsn = "https://key@sentry.example.com/1" })

assertNull(fixture.sentryOptions.sslSocketFactory)
}

@Config(sdk = [Build.VERSION_CODES.O])
@Config(sdk = [30])
@Test
fun `init on API 26 and higher does not set SSLSocketFactory`() {
fixture.initSut(configureOptions = { dsn = SAAS_DSN })

assertNull(fixture.sentryOptions.sslSocketFactory)
}

@Config(sdk = [Build.VERSION_CODES.N_MR1])
@Config(sdk = [Build.VERSION_CODES.N])
@Test
fun `init on API 25 and lower keeps user provided SSLSocketFactory`() {
val sslSocketFactory = mock<javax.net.ssl.SSLSocketFactory>()
Expand Down Expand Up @@ -437,7 +437,7 @@ class AndroidOptionsInitializerTest {
)
}

@Config(sdk = [34])
@Config(sdk = [33])
@Test
fun `init below API 35 does not report PerfettoContinuousProfiling integration`() {
SentryIntegrationPackageStorage.getInstance().clearStorage()
Expand All @@ -450,14 +450,14 @@ class AndroidOptionsInitializerTest {
)
}

@Config(sdk = [34])
@Config(sdk = [33])
@Test
fun `init below API 35 with enableLegacyProfiling true sets AndroidContinuousProfiler`() {
fixture.initSut(configureOptions = { isEnableLegacyProfiling = true })
assertTrue(fixture.sentryOptions.continuousProfiler is AndroidContinuousProfiler)
}

@Config(sdk = [34])
@Config(sdk = [33])
@Test
fun `init below API 35 with enableLegacyProfiling false noops profiler`() {
fixture.initSut(configureOptions = { isEnableLegacyProfiling = false })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import org.robolectric.shadows.ShadowActivityManager.ApplicationExitInfoBuilder
// Our current Robolectric version (4.15) caps at API 35. All ApplicationExitInfo code paths we
// exercise are at API 31 or below, so we use the latter.
@RunWith(AndroidJUnit4::class)
@Config(sdk = [31])
@Config(sdk = [33])
class ApplicationExitInfoCrossIntegrationTest {

@get:Rule val tmpDir = TemporaryFolder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class ScreenshotEventProcessorTest {
}

@Test
@Config(sdk = [23])
@Config(sdk = [24])
fun `when screenshot event processor is called from background thread it executes on main thread`() {
val sut = fixture.getSut(true)
whenever(fixture.threadChecker.isMainThread).thenReturn(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class SentryAndroidTest {
}

@Test
@Config(sdk = [26])
@Config(sdk = [30])
fun `init starts session replay if app is in foreground`() {
initSentryWithForegroundImportance(true) { _ ->
Shadows.shadowOf(Looper.getMainLooper()).idle()
Expand All @@ -358,7 +358,7 @@ class SentryAndroidTest {
}

@Test
@Config(sdk = [26])
@Config(sdk = [30])
fun `init does not start session replay if the app is in background`() {
initSentryWithForegroundImportance(false) { _ ->
Shadows.shadowOf(Looper.getMainLooper()).idle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import org.junit.runner.RunWith
import org.robolectric.annotation.Config

@RunWith(AndroidJUnit4::class)
@Config(sdk = [31])
@Config(sdk = [33])
class SessionTrackingIntegrationTest {
private lateinit var context: Context

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.robolectric.annotation.Config
import org.robolectric.shadows.ShadowActivityManager.ApplicationExitInfoBuilder

@RunWith(AndroidJUnit4::class)
@Config(sdk = [31])
@Config(sdk = [33])
class TombstoneIntegrationTest : ApplicationExitIntegrationTestBase<TombstoneHint>() {

override val config =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import org.robolectric.annotation.Config
* that must not wait for them run on a separate caller thread with a bounded wait.
*/
@RunWith(AndroidJUnit4::class)
@Config(sdk = [Build.VERSION_CODES.S])
@Config(sdk = [Build.VERSION_CODES.TIRAMISU])
class AndroidConnectionStatusProviderConcurrencyTest {

@AfterTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class AndroidConnectionStatusProviderTest {

/// Lets a test reject work only after the setup that needs a working executor is done.
@Test
@Config(sdk = [Build.VERSION_CODES.S])
@Config(sdk = [Build.VERSION_CODES.TIRAMISU])
fun `When the network callback cannot be registered, the telephony listener is not started`() {
// Without ACCESS_NETWORK_STATE the network callback registration fails, and onBackground skips
// unregistering while there is no network callback, so the listener must not be started here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.mockito.kotlin.whenever
import org.robolectric.annotation.Config

@RunWith(AndroidJUnit4::class)
@Config(sdk = [Build.VERSION_CODES.S])
@Config(sdk = [Build.VERSION_CODES.TIRAMISU])
class CellularNetworkTechnologyProviderTest {
private class Fixture {
val context = mock<Context>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.robolectric.Robolectric.buildActivity
import org.robolectric.annotation.Config
import org.robolectric.shadows.ShadowPixelCopy

@Config(shadows = [ShadowPixelCopy::class], sdk = [26, 33])
@Config(shadows = [ShadowPixelCopy::class], sdk = [30, 33])
@RunWith(AndroidJUnit4::class)
class ScreenshotUtilTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import org.robolectric.shadows.ShadowBitmapFactory
import org.robolectric.shadows.ShadowCloseGuard

@RunWith(AndroidJUnit4::class)
@Config(sdk = [26], shadows = [ReplayShadowMediaCodec::class])
@Config(sdk = [30], shadows = [ReplayShadowMediaCodec::class])
class ReplayCacheTest {
@get:Rule val tmpDir = TemporaryFolder()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import org.robolectric.Shadows.shadowOf
import org.robolectric.annotation.Config

@RunWith(AndroidJUnit4::class)
@Config(sdk = [26], shadows = [ReplayShadowMediaCodec::class])
@Config(sdk = [30], shadows = [ReplayShadowMediaCodec::class])
class ReplayIntegrationTest {
@get:Rule val tmpDir = TemporaryFolder()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import org.mockito.kotlin.whenever
import org.robolectric.annotation.Config

@RunWith(AndroidJUnit4::class)
@Config(sdk = [26], shadows = [ReplayShadowMediaCodec::class])
@Config(sdk = [30], shadows = [ReplayShadowMediaCodec::class])
class ReplayIntegrationWithRecorderTest {
@get:Rule val tmpDir = TemporaryFolder()

Expand Down
Loading