Skip to content

Commit 715d476

Browse files
committed
Fix tests
1 parent 36e00e3 commit 715d476

File tree

8 files changed

+14
-7
lines changed

8 files changed

+14
-7
lines changed

Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
enableAddressSanitizer = "YES"
2930
enableASanStackUseAfterReturn = "YES"
30-
enableThreadSanitizer = "YES"
3131
shouldUseLaunchSchemeArgsEnv = "YES">
3232
<Testables>
3333
<TestableReference

Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ - (void)writeUserMutation:(FSTMutation *)mutation {
345345
write.write = mutation;
346346
[[self currentOutstandingWrites] addObject:write];
347347
LOG_DEBUG("sending a user write.");
348-
_workerQueue->EnqueueBlocking([&] {
348+
_workerQueue->EnqueueBlocking([=] {
349349
[self.syncEngine writeMutations:@[ mutation ]
350350
completion:^(NSError *_Nullable error) {
351351
LOG_DEBUG("A callback was called with error: %s", error);

Firestore/Source/Core/FSTFirestoreClient.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ - (instancetype)initWithDatabaseInfo:(const DatabaseInfo &)databaseInfo
132132
bool initialized = false;
133133

134134
__weak __typeof__(self) weakSelf = self;
135-
auto credentialChangeListener = [initialized, userPromise, weakSelf,
135+
auto credentialChangeListener = [self, initialized, userPromise, weakSelf,
136136
workerQueue](User user) mutable {
137137
__typeof__(self) strongSelf = weakSelf;
138138
if (!strongSelf) return;

Firestore/core/src/firebase/firestore/util/async_queue.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ namespace firebase {
2525
namespace firestore {
2626
namespace util {
2727

28-
using Executor;
29-
3028
AsyncQueue::AsyncQueue(std::unique_ptr<Executor> executor)
3129
: executor_{std::move(executor)} {
3230
is_operation_in_progress_ = false;

Firestore/core/src/firebase/firestore/util/executor_libdispatch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ namespace firebase {
3939
namespace firestore {
4040
namespace util {
4141

42+
namespace internal {
43+
4244
// Generic wrapper over `dispatch_async_f`, providing `dispatch_async`-like
4345
// interface: accepts an arbitrary invocable object in place of an Objective-C
4446
// block.
@@ -47,6 +49,8 @@ void DispatchAsync(dispatch_queue_t queue, std::function<void()>&& work);
4749
// Similar to `DispatchAsync` but wraps `dispatch_sync_f`.
4850
void DispatchSync(dispatch_queue_t queue, std::function<void()> work);
4951

52+
} // namespace internal
53+
5054
class TimeSlot;
5155

5256
// A serial queue built on top of libdispatch. The operations are run on

Firestore/core/src/firebase/firestore/util/executor_libdispatch.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
} // namespace
4747

48+
namespace internal {
49+
4850
void DispatchAsync(const dispatch_queue_t queue, std::function<void()>&& work) {
4951
// Dynamically allocate the function to make sure the object is valid by the
5052
// time libdispatch gets to it.
@@ -70,6 +72,11 @@ void DispatchSync(const dispatch_queue_t queue, std::function<void()> work) {
7072
});
7173
}
7274

75+
} // namespace internal
76+
77+
using internal::DispatchAsync;
78+
using internal::DispatchSync;
79+
7380
namespace {
7481

7582
template <typename Work>

Firestore/core/test/firebase/firestore/util/executor_test.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ namespace firestore {
3030
namespace util {
3131

3232
namespace chr = std::chrono;
33-
using Executor;
3433

3534
namespace {
3635

Firestore/core/test/firebase/firestore/util/grpc_stream_tester.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ namespace firebase {
2929
namespace firestore {
3030
namespace util {
3131

32-
using ExecutorStd;
3332
using auth::Token;
3433
using auth::User;
3534
using model::DatabaseId;

0 commit comments

Comments
 (0)