Skip to content

Commit bd64a0a

Browse files
committed
finish integration test
1 parent cac906f commit bd64a0a

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Firestore/Example/Tests/Integration/API/FIRQueryTests.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,10 @@ - (void)testResumingAQueryShouldUseExistenceFilterToDetectDeletes {
12901290

12911291
// Verify that Watch sent an existence filter with the correct counts when the query was resumed.
12921292
XCTAssertEqual(static_cast<int>(existence_filter_mismatches.size()), 1);
1293+
firebase::firestore::util::TestingHooks::ExistenceFilterMismatchInfo &info =
1294+
existence_filter_mismatches[0];
1295+
XCTAssertEqual(info.local_cache_count, 100);
1296+
XCTAssertEqual(info.existence_filter_count, 50);
12931297
}
12941298

12951299
@end

Firestore/core/src/util/testing_hooks.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class TestingHooks final {
4444
* registered with `OnExistenceFilterMismatch()`.
4545
*/
4646
struct ExistenceFilterMismatchInfo {
47-
int localCacheCount = -1;
48-
int existenceFilterCount = -1;
47+
int local_cache_count = -1;
48+
int existence_filter_count = -1;
4949
};
5050

5151
using ExistenceFilterMismatchCallback =

Firestore/core/test/unit/testutil/async_testing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#include <functional>
2222
#include <future> // NOLINT(build/c++11)
2323
#include <memory>
24-
#include <mutex> // NOLINT(build/c++11)
24+
#include <mutex> // NOLINT(build/c++11)
2525
#include <thread> // NOLINT(build/c++11)
26-
#include <vector>
2726
#include <utility>
27+
#include <vector>
2828

2929
#include "gtest/gtest.h"
3030

Firestore/core/test/unit/util/testing_hooks_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class TestingHooksTest : public ::testing::Test, public AsyncTest {
5050
Await(accumulator->WaitForObject());
5151
ASSERT_FALSE(accumulator->IsEmpty());
5252
TestingHooks::ExistenceFilterMismatchInfo info = accumulator->Shift();
53-
EXPECT_EQ(info.localCacheCount, expected.localCacheCount);
54-
EXPECT_EQ(info.existenceFilterCount, expected.existenceFilterCount);
53+
EXPECT_EQ(info.local_cache_count, expected.local_cache_count);
54+
EXPECT_EQ(info.existence_filter_count, expected.existence_filter_count);
5555
}
5656

5757
std::future<void> NotifyOnExistenceFilterMismatchAsync(

0 commit comments

Comments
 (0)