File tree Expand file tree Collapse file tree 7 files changed +25
-18
lines changed Expand file tree Collapse file tree 7 files changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -858,9 +858,9 @@ - (void)testWatchStreamReconnectsAfterIdle {
858
858
FIRDocumentReference *doc = [self documentRef ];
859
859
FIRFirestore *firestore = doc.firestore ;
860
860
861
- [self readSnapshotForRef: [self documentRef ] online :YES ];
861
+ [self readSnapshotForRef: [self documentRef ] requireOnline :YES ];
862
862
[self waitForIdle: firestore];
863
- [self readSnapshotForRef: [self documentRef ] online :YES ];
863
+ [self readSnapshotForRef: [self documentRef ] requireOnline :YES ];
864
864
}
865
865
866
866
@end
Original file line number Diff line number Diff line change 20
20
21
21
#import " Auth/FSTEmptyCredentialsProvider.h"
22
22
#import " Core/FSTDatabaseInfo.h"
23
- #import " FSTTestDispatchQueue.h"
24
23
#import " FSTHelpers.h"
25
24
#import " FSTIntegrationTestCase.h"
25
+ #import " FSTTestDispatchQueue.h"
26
26
#import " Model/FSTDatabaseID.h"
27
27
#import " Remote/FSTDatastore.h"
28
28
#import " Util/FSTAssert.h"
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ NS_ASSUME_NONNULL_BEGIN
69
69
70
70
- (FIRQuerySnapshot *)readDocumentSetForRef : (FIRQuery *)query ;
71
71
72
- - (FIRDocumentSnapshot *)readSnapshotForRef : (FIRDocumentReference *)query online : (BOOL )online ;
72
+ - (FIRDocumentSnapshot *)readSnapshotForRef : (FIRDocumentReference *)query
73
+ requireOnline : (BOOL )online ;
73
74
74
75
- (void )writeDocumentRef : (FIRDocumentReference *)ref data : (NSDictionary <NSString *, id> *)data ;
75
76
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ - (FIRQuerySnapshot *)readDocumentSetForRef:(FIRQuery *)query {
235
235
return result;
236
236
}
237
237
238
- - (FIRDocumentSnapshot *)readSnapshotForRef : (FIRDocumentReference *)ref online : (BOOL )online {
238
+ - (FIRDocumentSnapshot *)readSnapshotForRef : (FIRDocumentReference *)ref requireOnline : (BOOL )online {
239
239
__block FIRDocumentSnapshot *result;
240
240
241
241
XCTestExpectation *expectation = [self expectationWithDescription: @" listener" ];
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ @interface FSTTestDispatchQueue ()
28
28
29
29
@implementation FSTTestDispatchQueue
30
30
31
+ static const NSTimeInterval kMaxDispatchDelay = 1.0 ;
32
+
31
33
+ (instancetype )queueWith : (dispatch_queue_t )dispatchQueue {
32
34
return [[FSTTestDispatchQueue alloc ] initWithQueue: dispatchQueue];
33
35
}
@@ -38,20 +40,20 @@ - (instancetype)initWithQueue:(dispatch_queue_t)dispatchQueue {
38
40
39
41
- (void )dispatchAsync : (void (^)(void ))block after : (NSTimeInterval )delay {
40
42
[super dispatchAsyncAllowingSameQueue: ^() {
41
- block ();
42
- [_expectation fulfill ];
43
- _expectation = nil ;
44
- }
45
- after: MIN (delay, 1.0 )];
43
+ block ();
44
+ [_expectation fulfill ];
45
+ _expectation = nil ;
46
+ }
47
+ after: MIN (delay, kMaxDispatchDelay )];
46
48
}
47
49
48
50
- (void )dispatchAsyncAllowingSameQueue : (void (^)(void ))block after : (NSTimeInterval )delay {
49
51
[super dispatchAsyncAllowingSameQueue: ^() {
50
- block ();
51
- [_expectation fulfill ];
52
- _expectation = nil ;
53
- }
54
- after: MIN (delay, 1.0 )];
52
+ block ();
53
+ [_expectation fulfill ];
54
+ _expectation = nil ;
55
+ }
56
+ after: MIN (delay, kMaxDispatchDelay )];
55
57
}
56
58
57
59
- (void )fulfillOnExecution : (XCTestExpectation*)expectation {
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ NS_ASSUME_NONNULL_BEGIN
213
213
214
214
@end
215
215
216
- #pragma mark - FSTWatchStream
216
+ #pragma mark - FSTWatchStreamDelegate
217
217
218
218
/* * A protocol defining the events that can be emitted by the FSTWatchStream. */
219
219
@protocol FSTWatchStreamDelegate <NSObject >
@@ -240,6 +240,8 @@ NS_ASSUME_NONNULL_BEGIN
240
240
241
241
@end
242
242
243
+ #pragma mark - FSTWatchStream
244
+
243
245
/* *
244
246
* An FSTStream that implements the StreamingWatch RPC.
245
247
*
@@ -276,7 +278,7 @@ NS_ASSUME_NONNULL_BEGIN
276
278
277
279
@end
278
280
279
- #pragma mark - FSTWriteStream
281
+ #pragma mark - FSTWriteStreamDelegate
280
282
281
283
@protocol FSTWriteStreamDelegate <NSObject >
282
284
@@ -308,6 +310,8 @@ NS_ASSUME_NONNULL_BEGIN
308
310
309
311
@end
310
312
313
+ #pragma mark - FSTWriteStream
314
+
311
315
/* *
312
316
* An FSTStream that implements the StreamingWrite RPC.
313
317
*
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ - (instancetype)initWithDatabase:(FSTDatabaseInfo *)database
120
120
- (instancetype )initWithDatabase : (FSTDatabaseInfo *)database
121
121
workerDispatchQueue : (FSTDispatchQueue *)workerDispatchQueue
122
122
credentials : (id <FSTCredentialsProvider>)credentials
123
- responseMessageClass : (Class )responseMessageClassNS_UNAVAILABLE ;
123
+ responseMessageClass : (Class )responseMessageClass NS_UNAVAILABLE ;
124
124
125
125
@end
126
126
You can’t perform that action at this time.
0 commit comments