@@ -250,8 +250,6 @@ public void listenToDocumentsWithBsonTypes() throws Throwable {
250
250
}
251
251
}
252
252
253
- // TODO(Mila/BSON): remove the cache population after updating the
254
- // assertSDKQueryResultsConsistentWithBackend
255
253
@ Test
256
254
public void filterAndOrderBsonObjectIds () throws Exception {
257
255
Map <String , Map <String , Object >> docs =
@@ -264,9 +262,6 @@ public void filterAndOrderBsonObjectIds() throws Exception {
264
262
map ("key" , new BsonObjectId ("507f191e810c19729de860ec" )));
265
263
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
266
264
267
- // Pre-populate the cache with all docs
268
- waitFor (randomColl .get ());
269
-
270
265
Query orderedQuery =
271
266
randomColl
272
267
.orderBy ("key" , Direction .DESCENDING )
@@ -296,9 +291,6 @@ public void filterAndOrderBsonTimestamps() throws Exception {
296
291
map ("key" , new BsonTimestamp (2 , 1 )));
297
292
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
298
293
299
- // Pre-populate the cache with all docs
300
- waitFor (randomColl .get ());
301
-
302
294
Query orderedQuery =
303
295
randomColl
304
296
.orderBy ("key" , Direction .DESCENDING )
@@ -328,9 +320,6 @@ public void filterAndOrderBsonBinaryData() throws Exception {
328
320
map ("key" , BsonBinaryData .fromBytes (2 , new byte [] {1 , 2 , 2 })));
329
321
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
330
322
331
- // Pre-populate the cache with all docs
332
- waitFor (randomColl .get ());
333
-
334
323
Query orderedQuery =
335
324
randomColl
336
325
.orderBy ("key" , Direction .DESCENDING )
@@ -357,9 +346,6 @@ public void filterAndOrderRegex() throws Exception {
357
346
"c" , map ("key" , new RegexValue ("^baz" , "i" )));
358
347
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
359
348
360
- // Pre-populate the cache with all docs
361
- waitFor (randomColl .get ());
362
-
363
349
Query orderedQuery =
364
350
randomColl
365
351
.orderBy ("key" , Direction .DESCENDING )
@@ -386,9 +372,6 @@ public void filterAndOrderInt32() throws Exception {
386
372
"c" , map ("key" , new Int32Value (2 )));
387
373
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
388
374
389
- // Pre-populate the cache with all docs
390
- waitFor (randomColl .get ());
391
-
392
375
Query orderedQuery =
393
376
randomColl .orderBy ("key" , Direction .DESCENDING ).whereGreaterThan ("key" , new Int32Value (-1 ));
394
377
@@ -413,9 +396,6 @@ public void filterAndOrderMinKey() throws Exception {
413
396
"e" , map ("key" , MaxKey .instance ()));
414
397
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
415
398
416
- // Pre-populate the cache with all docs
417
- waitFor (randomColl .get ());
418
-
419
399
Query query =
420
400
randomColl
421
401
.orderBy (
@@ -426,9 +406,8 @@ public void filterAndOrderMinKey() throws Exception {
426
406
427
407
assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("b" , "a" ));
428
408
429
- // TODO(Mila/BSON): uncomment this test when null value inclusion is fixed
430
- // query = randomColl.whereNotEqualTo("key", MinKey.instance());
431
- // assertSDKQueryResultsConsistentWithBackend(query, docs, Arrays.asList("d", "e"));
409
+ query = randomColl .whereNotEqualTo ("key" , MinKey .instance ());
410
+ assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("d" , "e" ));
432
411
433
412
query = randomColl .whereGreaterThanOrEqualTo ("key" , MinKey .instance ());
434
413
assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("a" , "b" ));
@@ -454,9 +433,6 @@ public void filterAndOrderMaxKey() throws Exception {
454
433
"e" , map ("key" , null ));
455
434
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
456
435
457
- // Pre-populate the cache with all docs
458
- waitFor (randomColl .get ());
459
-
460
436
Query query =
461
437
randomColl
462
438
.orderBy (
@@ -467,9 +443,8 @@ public void filterAndOrderMaxKey() throws Exception {
467
443
468
444
assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("d" , "c" ));
469
445
470
- // TODO(Mila/BSON): uncomment this test when null value inclusion is fixed
471
- // query = randomColl.whereNotEqualTo("key", MaxKey.instance());
472
- // assertSDKQueryResultsConsistentWithBackend(randomColl, query, docs, Arrays.asList("a", "b"));
446
+ query = randomColl .whereNotEqualTo ("key" , MaxKey .instance ());
447
+ assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("a" , "b" ));
473
448
474
449
query = randomColl .whereGreaterThanOrEqualTo ("key" , MaxKey .instance ());
475
450
assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("c" , "d" ));
@@ -495,9 +470,6 @@ public void filterNullValueWithBsonTypes() throws Exception {
495
470
"e" , map ("key" , MaxKey .instance ()));
496
471
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
497
472
498
- // Pre-populate the cache with all docs
499
- waitFor (randomColl .get ());
500
-
501
473
Query query = randomColl .whereEqualTo ("key" , null );
502
474
assertSDKQueryResultsConsistentWithBackend (randomColl , query , docs , Arrays .asList ("b" , "c" ));
503
475
@@ -550,9 +522,6 @@ public void orderBsonTypesTogether() throws Exception {
550
522
map ("key" , MaxKey .instance ()));
551
523
CollectionReference randomColl = testCollectionWithDocsOnNightly (docs );
552
524
553
- // Pre-populate the cache with all docs
554
- waitFor (randomColl .get ());
555
-
556
525
Query orderedQuery = randomColl .orderBy ("key" , Direction .DESCENDING );
557
526
List <String > expectedDocs =
558
527
Arrays .asList (
0 commit comments