@@ -177,8 +177,8 @@ class SentryFileManagerTests: XCTestCase {
177177
178178 func testDeleteOldEnvelopes_LogsIgnoreDSStoreFiles( ) throws {
179179 let logOutput = TestLogOutput ( )
180- SentryLog . setLogOutput ( logOutput)
181- SentryLog . configureLog ( true , diagnosticLevel: . debug)
180+ SentrySDKLog . setLogOutput ( logOutput)
181+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
182182
183183 let dsStoreFile = " \( sut. basePath) /.DS_Store "
184184
@@ -198,8 +198,8 @@ class SentryFileManagerTests: XCTestCase {
198198
199199 func testDeleteOldEnvelopes_LogsDebugForTextFiles( ) throws {
200200 let logOutput = TestLogOutput ( )
201- SentryLog . setLogOutput ( logOutput)
202- SentryLog . configureLog ( true , diagnosticLevel: . debug)
201+ SentrySDKLog . setLogOutput ( logOutput)
202+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
203203
204204 let sut = fixture. getSut ( )
205205
@@ -221,8 +221,8 @@ class SentryFileManagerTests: XCTestCase {
221221
222222 func testGetEnvelopesPath_ForNonExistentPath_LogsWarning( ) throws {
223223 let logOutput = TestLogOutput ( )
224- SentryLog . setLogOutput ( logOutput)
225- SentryLog . configureLog ( true , diagnosticLevel: . debug)
224+ SentrySDKLog . setLogOutput ( logOutput)
225+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
226226
227227 let sut = fixture. getSut ( )
228228
@@ -302,7 +302,7 @@ class SentryFileManagerTests: XCTestCase {
302302
303303 func testDeleteFileNotExists( ) {
304304 let logOutput = TestLogOutput ( )
305- SentryLog . setLogOutput ( logOutput)
305+ SentrySDKLog . setLogOutput ( logOutput)
306306 sut. removeFile ( atPath: " x " )
307307 XCTAssertFalse ( logOutput. loggedMessages. contains ( where: { $0. contains ( " [error] " ) } ) )
308308 }
@@ -642,8 +642,8 @@ class SentryFileManagerTests: XCTestCase {
642642
643643 func testGetAllEnvelopesWhenNoEnvelopesPath_LogsInfoMessage( ) {
644644 let logOutput = TestLogOutput ( )
645- SentryLog . setLogOutput ( logOutput)
646- SentryLog . configureLog ( true , diagnosticLevel: . debug)
645+ SentrySDKLog . setLogOutput ( logOutput)
646+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
647647
648648 sut. deleteAllFolders ( )
649649 sut. getAllEnvelopes ( )
@@ -850,13 +850,13 @@ class SentryFileManagerTests: XCTestCase {
850850
851851 func testReadPreviousBreadcrumbs( ) throws {
852852 let breadcrumbProcessor = SentryWatchdogTerminationBreadcrumbProcessor ( maxBreadcrumbs: 2 , fileManager: sut)
853- let attributesProcessor = try SentryWatchdogTerminationAttributesProcessor (
853+ let contextProcessor = SentryWatchdogTerminationContextProcessor (
854854 withDispatchQueueWrapper: SentryDispatchQueueWrapper ( ) ,
855- scopePersistentStore : XCTUnwrap ( SentryScopePersistentStore ( fileManager: sut) )
855+ scopeContextStore : SentryScopeContextPersistentStore ( fileManager: sut)
856856 )
857857 let observer = SentryWatchdogTerminationScopeObserver (
858858 breadcrumbProcessor: breadcrumbProcessor,
859- attributesProcessor : attributesProcessor
859+ contextProcessor : contextProcessor
860860 )
861861
862862 for count in 0 ..< 3 {
@@ -880,13 +880,13 @@ class SentryFileManagerTests: XCTestCase {
880880
881881 func testReadPreviousBreadcrumbsCorrectOrderWhenFileTwoHasMoreCrumbs( ) throws {
882882 let breadcrumbProcessor = SentryWatchdogTerminationBreadcrumbProcessor ( maxBreadcrumbs: 2 , fileManager: sut)
883- let attributesProcessor = try SentryWatchdogTerminationAttributesProcessor (
883+ let contextProcessor = SentryWatchdogTerminationContextProcessor (
884884 withDispatchQueueWrapper: TestSentryDispatchQueueWrapper ( ) ,
885- scopePersistentStore : XCTUnwrap ( SentryScopePersistentStore ( fileManager: sut) )
885+ scopeContextStore : SentryScopeContextPersistentStore ( fileManager: sut)
886886 )
887887 let observer = SentryWatchdogTerminationScopeObserver (
888888 breadcrumbProcessor: breadcrumbProcessor,
889- attributesProcessor : attributesProcessor
889+ contextProcessor : contextProcessor
890890 )
891891
892892 for count in 0 ..< 5 {
@@ -1044,8 +1044,8 @@ class SentryFileManagerTests: XCTestCase {
10441044 func testCreateDirectoryIfNotExists_successful_shouldNotLogError( ) throws {
10451045 // -- Arrange -
10461046 let logOutput = TestLogOutput ( )
1047- SentryLog . setLogOutput ( logOutput)
1048- SentryLog . configureLog ( true , diagnosticLevel: . debug)
1047+ SentrySDKLog . setLogOutput ( logOutput)
1048+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
10491049
10501050 let path = fixture. getValidDirectoryPath ( )
10511051 var error : NSError ?
@@ -1059,8 +1059,8 @@ class SentryFileManagerTests: XCTestCase {
10591059 func testCreateDirectoryIfNotExists_pathTooLogError_shouldLogError( ) throws {
10601060 // -- Arrange -
10611061 let logOutput = TestLogOutput ( )
1062- SentryLog . setLogOutput ( logOutput)
1063- SentryLog . configureLog ( true , diagnosticLevel: . debug)
1062+ SentrySDKLog . setLogOutput ( logOutput)
1063+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
10641064
10651065 let path = fixture. getTooLongPath ( )
10661066 var error : NSError ?
@@ -1076,8 +1076,8 @@ class SentryFileManagerTests: XCTestCase {
10761076 func testCreateDirectoryIfNotExists_otherError_shouldNotLogError( ) throws {
10771077 // -- Arrange -
10781078 let logOutput = TestLogOutput ( )
1079- SentryLog . setLogOutput ( logOutput)
1080- SentryLog . configureLog ( true , diagnosticLevel: . debug)
1079+ SentrySDKLog . setLogOutput ( logOutput)
1080+ SentrySDKLog . configureLog ( true , diagnosticLevel: . debug)
10811081
10821082 let path = fixture. getInvalidPath ( )
10831083 var error : NSError ?
@@ -1121,7 +1121,7 @@ class SentryFileManagerTests: XCTestCase {
11211121 let data = Data ( " <TEST DATA> " . utf8)
11221122
11231123 let logOutput = TestLogOutput ( )
1124- SentryLog . setLogOutput ( logOutput)
1124+ SentrySDKLog . setLogOutput ( logOutput)
11251125
11261126 // Check pre-conditions
11271127 let fm = FileManager . default
@@ -1167,7 +1167,7 @@ extension SentryFileManagerTests {
11671167 profilesSampleRate: expectedProfilesSampleRate,
11681168 profilesSampleRand: expectedProfilesSampleRand
11691169 )
1170- let config = sentry_persistedLaunchProfileConfigurationOptions ( )
1170+ let config = sentry_appLaunchProfileConfiguration ( )
11711171
11721172 // -- Assert --
11731173 let actualTracesSampleRate = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyTracesSampleRate] ) . doubleValue
@@ -1183,7 +1183,7 @@ extension SentryFileManagerTests {
11831183 // if a file isn't present when we expect it to be, like if there was an issue when we went to write it to disk
11841184 func testsentry_appLaunchProfileConfiguration_noConfigurationExists( ) throws {
11851185 try ensureAppLaunchProfileConfig ( exists: false )
1186- XCTAssertNil ( sentry_persistedLaunchProfileConfigurationOptions ( ) )
1186+ XCTAssertNil ( sentry_appLaunchProfileConfiguration ( ) )
11871187 }
11881188
11891189 func testWriteAppLaunchProfilingConfigFile_noCurrentFileExists( ) throws {
@@ -1200,10 +1200,9 @@ extension SentryFileManagerTests {
12001200 kSentryLaunchProfileConfigKeyProfilesSampleRate: expectedProfilesSampleRate,
12011201 kSentryLaunchProfileConfigKeyProfilesSampleRand: expectedProfilesSampleRand
12021202 ] )
1203-
1204- let configURL = try XCTUnwrap ( launchProfileConfigFileURL ( ) )
1205- let config = NSDictionary ( contentsOf: configURL)
1206-
1203+
1204+ let config = NSDictionary ( contentsOf: launchProfileConfigFileURL ( ) )
1205+
12071206 let actualTracesSampleRate = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyTracesSampleRate] as? NSNumber ) . doubleValue
12081207 let actualTracesSampleRand = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyTracesSampleRand] as? NSNumber ) . doubleValue
12091208 let actualProfilesSampleRate = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyProfilesSampleRate] as? NSNumber ) . doubleValue
@@ -1233,9 +1232,8 @@ extension SentryFileManagerTests {
12331232 ] )
12341233
12351234 // -- Assert --
1236- let configURL = try XCTUnwrap ( launchProfileConfigFileURL ( ) )
1237- let config = NSDictionary ( contentsOf: configURL)
1238-
1235+ let config = NSDictionary ( contentsOf: launchProfileConfigFileURL ( ) )
1236+
12391237 let actualTracesSampleRate = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyTracesSampleRate] as? NSNumber ) . doubleValue
12401238 let actualTracesSampleRand = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyTracesSampleRand] as? NSNumber ) . doubleValue
12411239 let actualProfilesSampleRate = try XCTUnwrap ( config ? [ kSentryLaunchProfileConfigKeyProfilesSampleRate] as? NSNumber ) . doubleValue
@@ -1248,17 +1246,17 @@ extension SentryFileManagerTests {
12481246
12491247 func testRemoveAppLaunchProfilingConfigFile( ) throws {
12501248 try ensureAppLaunchProfileConfig ( exists: true )
1251- XCTAssertNotNil ( NSDictionary ( contentsOf: try XCTUnwrap ( launchProfileConfigFileURL ( ) ) ) )
1249+ XCTAssertNotNil ( NSDictionary ( contentsOf: launchProfileConfigFileURL ( ) ) )
12521250 removeAppLaunchProfilingConfigFile ( )
1253- XCTAssertNil ( NSDictionary ( contentsOf: try XCTUnwrap ( launchProfileConfigFileURL ( ) ) ) )
1251+ XCTAssertNil ( NSDictionary ( contentsOf: launchProfileConfigFileURL ( ) ) )
12541252 }
12551253
12561254 // if there's not a file when we expect one, just make sure we don't crash
12571255 func testRemoveAppLaunchProfilingConfigFile_noFileExists( ) throws {
12581256 try ensureAppLaunchProfileConfig ( exists: false )
1259- XCTAssertNil ( NSDictionary ( contentsOf: try XCTUnwrap ( launchProfileConfigFileURL ( ) ) ) )
1257+ XCTAssertNil ( NSDictionary ( contentsOf: launchProfileConfigFileURL ( ) ) )
12601258 removeAppLaunchProfilingConfigFile ( )
1261- XCTAssertNil ( NSDictionary ( contentsOf: try XCTUnwrap ( launchProfileConfigFileURL ( ) ) ) )
1259+ XCTAssertNil ( NSDictionary ( contentsOf: launchProfileConfigFileURL ( ) ) )
12621260 }
12631261
12641262 func testCheckForLaunchProfilingConfigFile_URLDoesNotExist( ) {
@@ -1272,7 +1270,7 @@ extension SentryFileManagerTests {
12721270 XCTAssertFalse ( appLaunchProfileConfigFileExists ( ) )
12731271
12741272 // set the original value back so other tests don't crash
1275- sentryLaunchConfigFileURL = ( originalURL as? NSURL )
1273+ sentryLaunchConfigFileURL = ( originalURL as NSURL )
12761274 }
12771275
12781276 func testSentryGetScopedCachesDirectory_targetIsNotMacOS_shouldReturnSamePath( ) throws {
@@ -1385,7 +1383,7 @@ extension SentryFileManagerTests {
13851383// MARK: Private profiling tests
13861384private extension SentryFileManagerTests {
13871385 func ensureAppLaunchProfileConfig( exists: Bool = true , tracesSampleRate: Double = 1 , tracesSampleRand: Double = 1.0 , profilesSampleRate: Double = 1 , profilesSampleRand: Double = 1.0 ) throws {
1388- let url = try XCTUnwrap ( launchProfileConfigFileURL ( ) )
1386+ let url = launchProfileConfigFileURL ( )
13891387
13901388 if exists {
13911389 let dict = [
0 commit comments