Skip to content

Commit

Permalink
fix: Addressing random crash in Pinpoint Integration Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaland committed Feb 29, 2024
1 parent acaf1e8 commit 39b318d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AWSPinpointTests/AWSPinpointTargetingClientTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@interface AWSPinpointTargetingClientTests : XCTestCase
@property (nonatomic, strong) AWSPinpoint *pinpoint;
@property (nonatomic, strong) AWSPinpointConfiguration *configuration;
@property (nonatomic, strong) UIApplication *application;
@property (nonatomic, strong) id mockApplication;
@property (nonatomic, strong) NSUserDefaults *userDefaults;
@property (nonatomic, strong) AWSUICKeyChainStore *keychain;

Expand Down Expand Up @@ -72,6 +72,7 @@ - (void)setUp {
}

- (void)tearDown {
[self.mockApplication stopMocking];
[super tearDown];
}

Expand Down Expand Up @@ -122,6 +123,7 @@ - (void)initializeMockApplicationWithRemoteNotifications:(BOOL)withRemoteNotific
UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:notificationType categories:nil];
OCMStub([mockApplication currentUserNotificationSettings]).andReturn(notificationSettings);
OCMStub([mockApplication isRegisteredForRemoteNotifications]).andReturn(withRemoteNotifications);
self.mockApplication = mockApplication;
}

- (void)testConstructors {
Expand Down

0 comments on commit 39b318d

Please sign in to comment.