aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm')
-rw-r--r--Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm15
1 files changed, 5 insertions, 10 deletions
diff --git a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm
index df591b0..e34b2a5 100644
--- a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm
+++ b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm
@@ -30,7 +30,6 @@
#import "Firestore/Source/Util/FSTDispatchQueue.h"
#import "Firestore/Example/Tests/Util/FSTEventAccumulator.h"
-#import "Firestore/Example/Tests/Util/FSTTestDispatchQueue.h"
#include "Firestore/core/src/firebase/firestore/model/database_id.h"
#include "Firestore/core/src/firebase/firestore/util/string_apple.h"
@@ -133,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN
- (FIRFirestore *)firestoreWithProjectID:(NSString *)projectID {
NSString *persistenceKey = [NSString stringWithFormat:@"db%lu", (unsigned long)_firestores.count];
- FSTTestDispatchQueue *workerDispatchQueue = [FSTTestDispatchQueue
+ FSTDispatchQueue *workerDispatchQueue = [FSTDispatchQueue
queueWith:dispatch_queue_create("com.google.firebase.firestore", DISPATCH_QUEUE_SERIAL)];
FSTEmptyCredentialsProvider *credentialsProvider = [[FSTEmptyCredentialsProvider alloc] init];
@@ -155,14 +154,6 @@ NS_ASSUME_NONNULL_BEGIN
return firestore;
}
-- (void)waitForIdleFirestore:(FIRFirestore *)firestore {
- XCTestExpectation *expectation = [self expectationWithDescription:@"idle"];
- // Note that we wait on any task that is scheduled with a delay of 60s. Currently, the idle
- // timeout is the only task that uses this delay.
- [((FSTTestDispatchQueue *)firestore.workerDispatchQueue) fulfillOnExecution:expectation];
- [self awaitExpectations];
-}
-
- (void)shutdownFirestore:(FIRFirestore *)firestore {
[firestore shutdownWithCompletion:[self completionForExpectationWithName:@"shutdown"]];
[self awaitExpectations];
@@ -289,6 +280,10 @@ NS_ASSUME_NONNULL_BEGIN
[self awaitExpectations];
}
+- (FSTDispatchQueue *)queueForFirestore:(FIRFirestore *)firestore {
+ return firestore.workerDispatchQueue;
+}
+
- (void)waitUntil:(BOOL (^)())predicate {
NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
double waitSeconds = [self defaultExpectationWaitSeconds];