Skip to content

Commit 09761d0

Browse files
authored
Fix retain cycle build issue (#6693)
1 parent 672256e commit 09761d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

FirebaseMessaging/Tests/UnitTests/FIRMessagingPendingTopicsListTest.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ - (void)testBatchSizeReductionAfterSuccessfulTopicUpdate {
113113
XCTestExpectation *batchSizeReductionExpectation =
114114
[self expectationWithDescription:@"Batch size was reduced after topic suscription"];
115115

116+
__weak id weakSelf = self;
116117
self.alwaysReadyDelegate.subscriptionHandler =
117118
^(NSString *topic, FIRMessagingTopicAction action,
118119
FIRMessagingTopicOperationCompletion completion) {
119120
// Simulate that the handler is generally called asynchronously
120121
dispatch_async(dispatch_get_main_queue(), ^{
122+
id self = weakSelf;
121123
if (action == FIRMessagingTopicActionUnsubscribe) {
122124
XCTAssertEqual(pendingTopics.numberOfBatches, 1);
123125
[batchSizeReductionExpectation fulfill];

0 commit comments

Comments
 (0)