Skip to content

Commit eb8562f

Browse files
committed
various fixes
o fixed some broken documentaiton o skip geo index tests on old revs of mongod o pull a new version of libbson
1 parent eff245d commit eb8562f

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

doc/mongoc_collection_get_index_info.page

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,4 @@ mongoc_database_get_collection_info (mongoc_collection_t *collection,
4242
<code>NULL</code> will be returned in the case of a network error.</p>
4343
</section>
4444

45-
</code></screen>
46-
</section>
47-
4845
</page>

doc/mongoc_database_get_collection_info.page

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,4 @@ mongoc_database_get_collection_info (mongoc_database_t *database,
4343
server's representation of a collection in this database. A value of <code>NULL</code> will be returned on a network error.</p>
4444
</section>
4545

46-
</code></screen>
47-
</section>
48-
4946
</page>

tests/test-mongoc-collection.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -607,11 +607,13 @@ test_index_geo (void)
607607
geo_opt.twod_bits_precision = 30;
608608
opt.geo_options = &geo_opt;
609609

610-
r = mongoc_collection_create_index(collection, &keys, &opt, &error);
611-
ASSERT (r);
610+
if (client->cluster.nodes [0].max_wire_version > 0) {
611+
r = mongoc_collection_create_index(collection, &keys, &opt, &error);
612+
ASSERT (r);
612613

613-
r = mongoc_collection_drop_index(collection, "location_2d", &error);
614-
ASSERT (r);
614+
r = mongoc_collection_drop_index(collection, "location_2d", &error);
615+
ASSERT (r);
616+
}
615617

616618
/* Create a Haystack index */
617619
bson_init(&keys);
@@ -622,11 +624,13 @@ test_index_geo (void)
622624
geo_opt.haystack_bucket_size = 5;
623625
opt.geo_options = &geo_opt;
624626

625-
r = mongoc_collection_create_index(collection, &keys, &opt, &error);
626-
ASSERT (r);
627+
if (client->cluster.nodes [0].max_wire_version > 0) {
628+
r = mongoc_collection_create_index(collection, &keys, &opt, &error);
629+
ASSERT (r);
627630

628-
r = mongoc_collection_drop_index(collection, "location_geoHaystack_category_1", &error);
629-
ASSERT (r);
631+
r = mongoc_collection_drop_index(collection, "location_geoHaystack_category_1", &error);
632+
ASSERT (r);
633+
}
630634

631635
mongoc_collection_destroy(collection);
632636
mongoc_database_destroy(database);

0 commit comments

Comments
 (0)