13
13
namespace firebase {
14
14
namespace firestore {
15
15
16
+ // TODO(b/187448376): Temporarily disabling all tests as they seem to time out
17
+ // on Android.
18
+
16
19
using SourceTest = FirestoreIntegrationTest;
17
20
18
- TEST_F (SourceTest, GetDocumentWhileOnlineWithDefaultGetOptions ) {
21
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOnlineWithDefaultGetOptions ) {
19
22
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
20
23
DocumentReference doc_ref = DocumentWithData (initial_data);
21
24
@@ -29,7 +32,7 @@ TEST_F(SourceTest, GetDocumentWhileOnlineWithDefaultGetOptions) {
29
32
EXPECT_EQ (initial_data, snapshot.GetData ());
30
33
}
31
34
32
- TEST_F (SourceTest, GetCollectionWhileOnlineWithDefaultGetOptions ) {
35
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOnlineWithDefaultGetOptions ) {
33
36
std::map<std::string, MapFieldValue> initial_docs = {
34
37
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
35
38
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -46,7 +49,7 @@ TEST_F(SourceTest, GetCollectionWhileOnlineWithDefaultGetOptions) {
46
49
EXPECT_EQ (initial_docs, QuerySnapshotToMap (snapshot));
47
50
}
48
51
49
- TEST_F (SourceTest, GetDocumentWhileOfflineWithDefaultGetOptions ) {
52
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOfflineWithDefaultGetOptions ) {
50
53
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
51
54
DocumentReference doc_ref = DocumentWithData (initial_data);
52
55
@@ -63,7 +66,7 @@ TEST_F(SourceTest, GetDocumentWhileOfflineWithDefaultGetOptions) {
63
66
EXPECT_EQ (initial_data, snapshot.GetData ());
64
67
}
65
68
66
- TEST_F (SourceTest, GetCollectionWhileOfflineWithDefaultGetOptions ) {
69
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOfflineWithDefaultGetOptions ) {
67
70
std::map<std::string, MapFieldValue> initial_docs = {
68
71
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
69
72
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -97,7 +100,7 @@ TEST_F(SourceTest, GetCollectionWhileOfflineWithDefaultGetOptions) {
97
100
EXPECT_EQ (new_data, QuerySnapshotToMap (snapshot));
98
101
}
99
102
100
- TEST_F (SourceTest, GetDocumentWhileOnlineWithSourceEqualToCache ) {
103
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOnlineWithSourceEqualToCache ) {
101
104
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
102
105
DocumentReference doc_ref = DocumentWithData (initial_data);
103
106
@@ -112,7 +115,7 @@ TEST_F(SourceTest, GetDocumentWhileOnlineWithSourceEqualToCache) {
112
115
EXPECT_EQ (initial_data, snapshot.GetData ());
113
116
}
114
117
115
- TEST_F (SourceTest, GetCollectionWhileOnlineWithSourceEqualToCache ) {
118
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOnlineWithSourceEqualToCache ) {
116
119
std::map<std::string, MapFieldValue> initial_docs = {
117
120
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
118
121
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -130,7 +133,7 @@ TEST_F(SourceTest, GetCollectionWhileOnlineWithSourceEqualToCache) {
130
133
EXPECT_EQ (initial_docs, QuerySnapshotToMap (snapshot));
131
134
}
132
135
133
- TEST_F (SourceTest, GetDocumentWhileOfflineWithSourceEqualToCache ) {
136
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOfflineWithSourceEqualToCache ) {
134
137
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
135
138
DocumentReference doc_ref = DocumentWithData (initial_data);
136
139
@@ -146,7 +149,7 @@ TEST_F(SourceTest, GetDocumentWhileOfflineWithSourceEqualToCache) {
146
149
EXPECT_EQ (initial_data, snapshot.GetData ());
147
150
}
148
151
149
- TEST_F (SourceTest, GetCollectionWhileOfflineWithSourceEqualToCache ) {
152
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOfflineWithSourceEqualToCache ) {
150
153
std::map<std::string, MapFieldValue> initial_docs = {
151
154
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
152
155
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -180,7 +183,7 @@ TEST_F(SourceTest, GetCollectionWhileOfflineWithSourceEqualToCache) {
180
183
EXPECT_EQ (new_data, QuerySnapshotToMap (snapshot));
181
184
}
182
185
183
- TEST_F (SourceTest, GetDocumentWhileOnlineWithSourceEqualToServer ) {
186
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOnlineWithSourceEqualToServer ) {
184
187
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
185
188
DocumentReference doc_ref = DocumentWithData (initial_data);
186
189
@@ -194,7 +197,7 @@ TEST_F(SourceTest, GetDocumentWhileOnlineWithSourceEqualToServer) {
194
197
EXPECT_EQ (initial_data, snapshot.GetData ());
195
198
}
196
199
197
- TEST_F (SourceTest, GetCollectionWhileOnlineWithSourceEqualToServer ) {
200
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOnlineWithSourceEqualToServer ) {
198
201
std::map<std::string, MapFieldValue> initial_docs = {
199
202
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
200
203
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -211,7 +214,7 @@ TEST_F(SourceTest, GetCollectionWhileOnlineWithSourceEqualToServer) {
211
214
EXPECT_EQ (initial_docs, QuerySnapshotToMap (snapshot));
212
215
}
213
216
214
- TEST_F (SourceTest, GetDocumentWhileOfflineWithSourceEqualToServer ) {
217
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOfflineWithSourceEqualToServer ) {
215
218
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
216
219
DocumentReference doc_ref = DocumentWithData (initial_data);
217
220
@@ -224,7 +227,7 @@ TEST_F(SourceTest, GetDocumentWhileOfflineWithSourceEqualToServer) {
224
227
EXPECT_EQ (future.error (), Error::kErrorUnavailable );
225
228
}
226
229
227
- TEST_F (SourceTest, GetCollectionWhileOfflineWithSourceEqualToServer ) {
230
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOfflineWithSourceEqualToServer ) {
228
231
std::map<std::string, MapFieldValue> initial_docs = {
229
232
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
230
233
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -240,7 +243,7 @@ TEST_F(SourceTest, GetCollectionWhileOfflineWithSourceEqualToServer) {
240
243
EXPECT_EQ (future.error (), Error::kErrorUnavailable );
241
244
}
242
245
243
- TEST_F (SourceTest, GetDocumentWhileOfflineWithDifferentGetOptions ) {
246
+ TEST_F (SourceTest, DISABLED_GetDocumentWhileOfflineWithDifferentGetOptions ) {
244
247
MapFieldValue initial_data = {{" key" , FieldValue::String (" value" )}};
245
248
DocumentReference doc_ref = DocumentWithData (initial_data);
246
249
@@ -285,7 +288,7 @@ TEST_F(SourceTest, GetDocumentWhileOfflineWithDifferentGetOptions) {
285
288
EXPECT_EQ (future.error (), Error::kErrorUnavailable );
286
289
}
287
290
288
- TEST_F (SourceTest, GetCollectionWhileOfflineWithDifferentGetOptions ) {
291
+ TEST_F (SourceTest, DISABLED_GetCollectionWhileOfflineWithDifferentGetOptions ) {
289
292
std::map<std::string, MapFieldValue> initial_docs = {
290
293
{" doc1" , {{" key1" , FieldValue::String (" value1" )}}},
291
294
{" doc2" , {{" key2" , FieldValue::String (" value2" )}}},
@@ -347,7 +350,7 @@ TEST_F(SourceTest, GetCollectionWhileOfflineWithDifferentGetOptions) {
347
350
EXPECT_EQ (future.error (), Error::kErrorUnavailable );
348
351
}
349
352
350
- TEST_F (SourceTest, GetNonExistingDocWhileOnlineWithDefaultGetOptions ) {
353
+ TEST_F (SourceTest, DISABLED_GetNonExistingDocWhileOnlineWithDefaultGetOptions ) {
351
354
DocumentReference doc_ref = Document ();
352
355
353
356
Future<DocumentSnapshot> future = doc_ref.Get ();
@@ -359,7 +362,8 @@ TEST_F(SourceTest, GetNonExistingDocWhileOnlineWithDefaultGetOptions) {
359
362
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
360
363
}
361
364
362
- TEST_F (SourceTest, GetNonExistingCollectionWhileOnlineWithDefaultGetOptions) {
365
+ TEST_F (SourceTest,
366
+ DISABLED_GetNonExistingCollectionWhileOnlineWithDefaultGetOptions) {
363
367
CollectionReference col_ref = Collection ();
364
368
365
369
Future<QuerySnapshot> future = col_ref.Get ();
@@ -372,7 +376,8 @@ TEST_F(SourceTest, GetNonExistingCollectionWhileOnlineWithDefaultGetOptions) {
372
376
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
373
377
}
374
378
375
- TEST_F (SourceTest, GetNonExistingDocWhileOfflineWithDefaultGetOptions) {
379
+ TEST_F (SourceTest,
380
+ DISABLED_GetNonExistingDocWhileOfflineWithDefaultGetOptions) {
376
381
DocumentReference doc_ref = Document ();
377
382
378
383
DisableNetwork ();
@@ -400,7 +405,8 @@ TEST_F(SourceTest, DISABLED_GetDeletedDocWhileOfflineWithDefaultGetOptions) {
400
405
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
401
406
}
402
407
403
- TEST_F (SourceTest, GetNonExistingCollectionWhileOfflineWithDefaultGetOptions) {
408
+ TEST_F (SourceTest,
409
+ DISABLED_GetNonExistingCollectionWhileOfflineWithDefaultGetOptions) {
404
410
CollectionReference col_ref = Collection ();
405
411
406
412
DisableNetwork ();
@@ -414,7 +420,8 @@ TEST_F(SourceTest, GetNonExistingCollectionWhileOfflineWithDefaultGetOptions) {
414
420
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
415
421
}
416
422
417
- TEST_F (SourceTest, GetNonExistingDocWhileOnlineWithSourceEqualToCache) {
423
+ TEST_F (SourceTest,
424
+ DISABLED_GetNonExistingDocWhileOnlineWithSourceEqualToCache) {
418
425
DocumentReference doc_ref = Document ();
419
426
420
427
// Attempt to get doc. This will fail since there's nothing in cache.
@@ -424,7 +431,8 @@ TEST_F(SourceTest, GetNonExistingDocWhileOnlineWithSourceEqualToCache) {
424
431
EXPECT_EQ (future.error (), Error::kErrorUnavailable );
425
432
}
426
433
427
- TEST_F (SourceTest, GetNonExistingCollectionWhileOnlineWithSourceEqualToCache) {
434
+ TEST_F (SourceTest,
435
+ DISABLED_GetNonExistingCollectionWhileOnlineWithSourceEqualToCache) {
428
436
CollectionReference col_ref = Collection ();
429
437
430
438
Future<QuerySnapshot> future = col_ref.Get (Source::kCache );
@@ -437,7 +445,8 @@ TEST_F(SourceTest, GetNonExistingCollectionWhileOnlineWithSourceEqualToCache) {
437
445
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
438
446
}
439
447
440
- TEST_F (SourceTest, GetNonExistingDocWhileOfflineWithSourceEqualToCache) {
448
+ TEST_F (SourceTest,
449
+ DISABLED_GetNonExistingDocWhileOfflineWithSourceEqualToCache) {
441
450
DocumentReference doc_ref = Document ();
442
451
443
452
DisableNetwork ();
@@ -448,7 +457,7 @@ TEST_F(SourceTest, GetNonExistingDocWhileOfflineWithSourceEqualToCache) {
448
457
EXPECT_EQ (future.error (), Error::kErrorUnavailable );
449
458
}
450
459
451
- TEST_F (SourceTest, GetDeletedDocWhileOfflineWithSourceEqualToCache ) {
460
+ TEST_F (SourceTest, DISABLED_GetDeletedDocWhileOfflineWithSourceEqualToCache ) {
452
461
DocumentReference doc_ref = Document ();
453
462
Await (doc_ref.Delete ());
454
463
@@ -463,7 +472,8 @@ TEST_F(SourceTest, GetDeletedDocWhileOfflineWithSourceEqualToCache) {
463
472
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
464
473
}
465
474
466
- TEST_F (SourceTest, GetNonExistingCollectionWhileOfflineWithSourceEqualToCache) {
475
+ TEST_F (SourceTest,
476
+ DISABLED_GetNonExistingCollectionWhileOfflineWithSourceEqualToCache) {
467
477
CollectionReference col_ref = Collection ();
468
478
469
479
DisableNetwork ();
@@ -477,7 +487,8 @@ TEST_F(SourceTest, GetNonExistingCollectionWhileOfflineWithSourceEqualToCache) {
477
487
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
478
488
}
479
489
480
- TEST_F (SourceTest, GetNonExistingDocWhileOnlineWithSourceEqualToServer) {
490
+ TEST_F (SourceTest,
491
+ DISABLED_GetNonExistingDocWhileOnlineWithSourceEqualToServer) {
481
492
DocumentReference doc_ref = Document ();
482
493
483
494
Future<DocumentSnapshot> future = doc_ref.Get (Source::kServer );
@@ -489,7 +500,8 @@ TEST_F(SourceTest, GetNonExistingDocWhileOnlineWithSourceEqualToServer) {
489
500
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
490
501
}
491
502
492
- TEST_F (SourceTest, GetNonExistingCollectionWhileOnlineWithSourceEqualToServer) {
503
+ TEST_F (SourceTest,
504
+ DISABLED_GetNonExistingCollectionWhileOnlineWithSourceEqualToServer) {
493
505
CollectionReference col_ref = Collection ();
494
506
495
507
Future<QuerySnapshot> future = col_ref.Get (Source::kServer );
@@ -502,7 +514,8 @@ TEST_F(SourceTest, GetNonExistingCollectionWhileOnlineWithSourceEqualToServer) {
502
514
EXPECT_FALSE (snapshot.metadata ().has_pending_writes ());
503
515
}
504
516
505
- TEST_F (SourceTest, GetNonExistingDocWhileOfflineWithSourceEqualToServer) {
517
+ TEST_F (SourceTest,
518
+ DISABLED_GetNonExistingDocWhileOfflineWithSourceEqualToServer) {
506
519
DocumentReference doc_ref = Document ();
507
520
508
521
DisableNetwork ();
@@ -514,7 +527,7 @@ TEST_F(SourceTest, GetNonExistingDocWhileOfflineWithSourceEqualToServer) {
514
527
}
515
528
516
529
TEST_F (SourceTest,
517
- GetNonExistingCollectionWhileOfflineWithSourceEqualToServer ) {
530
+ DISABLED_GetNonExistingCollectionWhileOfflineWithSourceEqualToServer ) {
518
531
CollectionReference col_ref = Collection ();
519
532
520
533
DisableNetwork ();
0 commit comments