Skip to content

Commit

Permalink
Add #include for config.h to get the value for HAVE_LIBDISPATCH (#6041)…
Browse files Browse the repository at this point in the history
… (#6042)

Co-authored-by: Denver Coneybeare <[email protected]>
  • Loading branch information
wilhuff and dconeybe authored Jul 14, 2020
1 parent bc9c95b commit 2c58e9b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

# v1.16.2
- [fixed] Fixed a configuration issue where listeners were no longer being
called back on the main thread by default.

# v1.16.1
- [fixed] Removed a delay that may have prevented Firestore from immediately
establishing a network connection if a connectivity change occurred while
Expand Down
9 changes: 9 additions & 0 deletions Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,15 @@ - (void)testListenerCallbackBlocksRemove {
// `ListenerRegistration::Remove()` and expect to be able to immediately delete that state. The
// trouble is that there may be a callback in progress against that listener so the implementation
// now blocks the remove call until the callback is complete.
//
// To make this work, user callbacks can't be on the main thread because the main thread is
// blocked waiting for the test to complete (that is, you can't await expectations on the main
// thread and then have the user callback additionally await expectations).
dispatch_queue_t userQueue = dispatch_queue_create("firestore.test.user", DISPATCH_QUEUE_SERIAL);
FIRFirestoreSettings *settings = self.db.settings;
settings.dispatchQueue = userQueue;
self.db.settings = settings;

XCTestExpectation *running = [self expectationWithDescription:@"listener running"];
XCTestExpectation *allowCompletion =
[self expectationWithDescription:@"allow listener to complete"];
Expand Down
1 change: 1 addition & 0 deletions Firestore/Source/API/FIRFirestore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "Firestore/core/src/core/transaction.h"
#include "Firestore/core/src/model/database_id.h"
#include "Firestore/core/src/util/async_queue.h"
#include "Firestore/core/src/util/config.h"
#include "Firestore/core/src/util/empty.h"
#include "Firestore/core/src/util/error_apple.h"
#include "Firestore/core/src/util/exception.h"
Expand Down

0 comments on commit 2c58e9b

Please sign in to comment.