@@ -80,6 +80,7 @@ class SentrySDKTests: XCTestCase {
80
80
SentrySDK . start { options in
81
81
options. dsn = SentrySDKTests . dsnAsString
82
82
options. maxBreadcrumbs = 0
83
+ options. setIntegrations ( [ ] )
83
84
}
84
85
85
86
SentrySDK . addBreadcrumb ( Breadcrumb ( level: SentryLevel . warning, category: " test " ) )
@@ -123,6 +124,7 @@ class SentrySDKTests: XCTestCase {
123
124
func testStartStopBinaryImageCache( ) {
124
125
SentrySDK . start { options in
125
126
options. debug = true
127
+ options. removeAllIntegrations ( )
126
128
}
127
129
128
130
XCTAssertNotNil ( SentryDependencyContainer . sharedInstance ( ) . binaryImageCache. cache)
@@ -136,6 +138,7 @@ class SentrySDKTests: XCTestCase {
136
138
func testStartWithConfigureOptions_NoDsn( ) throws {
137
139
SentrySDK . start { options in
138
140
options. debug = true
141
+ options. removeAllIntegrations ( )
139
142
}
140
143
141
144
let options = SentrySDK . currentHub ( ) . getClient ( ) ? . options
@@ -148,6 +151,7 @@ class SentrySDKTests: XCTestCase {
148
151
func testStartWithConfigureOptions_WrongDsn( ) throws {
149
152
SentrySDK . start { options in
150
153
options. dsn = " wrong "
154
+ options. removeAllIntegrations ( )
151
155
}
152
156
153
157
let options = SentrySDK . currentHub ( ) . getClient ( ) ? . options
@@ -164,6 +168,7 @@ class SentrySDKTests: XCTestCase {
164
168
wasBeforeSendCalled = true
165
169
return event
166
170
}
171
+ options. removeAllIntegrations ( )
167
172
}
168
173
169
174
SentrySDK . capture ( message: " " )
@@ -181,6 +186,7 @@ class SentrySDKTests: XCTestCase {
181
186
XCTAssertEqual ( 123 , Dynamic ( suggested) . maxBreadcrumbs)
182
187
return scope
183
188
}
189
+ options. removeAllIntegrations ( )
184
190
}
185
191
XCTAssertEqual ( " me " , SentrySDK . currentHub ( ) . scope. userObject? . userId)
186
192
XCTAssertIdentical ( scope, SentrySDK . currentHub ( ) . scope)
@@ -412,7 +418,7 @@ class SentrySDKTests: XCTestCase {
412
418
413
419
func testInstallIntegrations_NoIntegrations( ) {
414
420
SentrySDK . start { options in
415
- options. integrations = [ ]
421
+ options. removeAllIntegrations ( )
416
422
}
417
423
418
424
assertIntegrationsInstalled ( integrations: [ ] )
@@ -491,6 +497,7 @@ class SentrySDKTests: XCTestCase {
491
497
492
498
SentrySDK . start { options in
493
499
options. dsn = SentrySDKTests . dsnAsString
500
+ options. removeAllIntegrations ( )
494
501
}
495
502
496
503
XCTAssertEqual ( 1 , SentrySDK . startInvocations)
@@ -504,6 +511,7 @@ class SentrySDKTests: XCTestCase {
504
511
505
512
SentrySDK . start { options in
506
513
options. dsn = SentrySDKTests . dsnAsString
514
+ options. removeAllIntegrations ( )
507
515
}
508
516
XCTAssertTrue ( SentrySDK . isEnabled)
509
517
@@ -515,13 +523,15 @@ class SentrySDKTests: XCTestCase {
515
523
516
524
SentrySDK . start { options in
517
525
options. dsn = SentrySDKTests . dsnAsString
526
+ options. removeAllIntegrations ( )
518
527
}
519
528
XCTAssertTrue ( SentrySDK . isEnabled)
520
529
}
521
530
522
531
func testClose_ResetsDependencyContainer( ) {
523
532
SentrySDK . start { options in
524
533
options. dsn = SentrySDKTests . dsnAsString
534
+ options. removeAllIntegrations ( )
525
535
}
526
536
527
537
let first = SentryDependencyContainer . sharedInstance ( )
@@ -536,9 +546,12 @@ class SentrySDKTests: XCTestCase {
536
546
func testClose_ClearsIntegrations( ) {
537
547
SentrySDK . start { options in
538
548
options. dsn = SentrySDKTests . dsnAsString
549
+ options. swiftAsyncStacktraces = true
550
+ options. setIntegrations ( [ SentrySwiftAsyncIntegration . self] )
539
551
}
540
552
541
553
let hub = SentrySDK . currentHub ( )
554
+ XCTAssertEqual ( 1 , hub. installedIntegrations ( ) . count)
542
555
SentrySDK . close ( )
543
556
XCTAssertEqual ( 0 , hub. installedIntegrations ( ) . count)
544
557
assertIntegrationsInstalled ( integrations: [ ] )
@@ -549,6 +562,7 @@ class SentrySDKTests: XCTestCase {
549
562
SentrySDK . start { options in
550
563
options. dsn = SentrySDKTests . dsnAsString
551
564
options. tracesSampleRate = 1
565
+ options. removeAllIntegrations ( )
552
566
}
553
567
554
568
let appStateManager = SentryDependencyContainer . sharedInstance ( ) . appStateManager
@@ -557,6 +571,7 @@ class SentrySDKTests: XCTestCase {
557
571
SentrySDK . start { options in
558
572
options. dsn = SentrySDKTests . dsnAsString
559
573
options. tracesSampleRate = 1
574
+ options. removeAllIntegrations ( )
560
575
}
561
576
562
577
XCTAssertEqual ( appStateManager. startCount, 2 )
@@ -606,6 +621,7 @@ class SentrySDKTests: XCTestCase {
606
621
func testClose_SetsClientToNil( ) {
607
622
SentrySDK . start { options in
608
623
options. dsn = SentrySDKTests . dsnAsString
624
+ options. removeAllIntegrations ( )
609
625
}
610
626
611
627
SentrySDK . close ( )
@@ -616,6 +632,7 @@ class SentrySDKTests: XCTestCase {
616
632
func testClose_ClosesClient( ) {
617
633
SentrySDK . start { options in
618
634
options. dsn = SentrySDKTests . dsnAsString
635
+ options. removeAllIntegrations ( )
619
636
}
620
637
621
638
let client = SentrySDK . currentHub ( ) . client ( )
@@ -627,6 +644,7 @@ class SentrySDKTests: XCTestCase {
627
644
func testClose_CallsFlushCorrectlyOnTransport( ) throws {
628
645
SentrySDK . start { options in
629
646
options. dsn = SentrySDKTests . dsnAsString
647
+ options. removeAllIntegrations ( )
630
648
}
631
649
632
650
let transport = TestTransport ( )
@@ -641,6 +659,7 @@ class SentrySDKTests: XCTestCase {
641
659
func testFlush_CallsFlushCorrectlyOnTransport( ) throws {
642
660
SentrySDK . start { options in
643
661
options. dsn = SentrySDKTests . dsnAsString
662
+ options. removeAllIntegrations ( )
644
663
}
645
664
646
665
let transport = TestTransport ( )
0 commit comments