diff options
author | James Wahlin <james.wahlin@mongodb.com> | 2019-08-14 13:52:59 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-08-14 13:52:59 +0000 |
commit | 39c3a5d77b976e131d37476f2e7255d6058f5093 (patch) | |
tree | 01cc28719f215b17196ec913f475cd8efda9b37d /jstests/core/geo_s2within_line_polygon_sphere.js | |
parent | 69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff) | |
download | mongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz |
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/core/geo_s2within_line_polygon_sphere.js')
-rw-r--r-- | jstests/core/geo_s2within_line_polygon_sphere.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/jstests/core/geo_s2within_line_polygon_sphere.js b/jstests/core/geo_s2within_line_polygon_sphere.js index 17b89d25f9e..73e4a0f897d 100644 --- a/jstests/core/geo_s2within_line_polygon_sphere.js +++ b/jstests/core/geo_s2within_line_polygon_sphere.js @@ -14,10 +14,11 @@ function testGeoWithinCenterSphereLinePolygon(coll) { } // Basic tests. - assert.writeOK(coll.insert({name: "Point1", geoField: {type: "Point", coordinates: [1, 1]}})); - assert.writeOK(coll.insert( + assert.commandWorked( + coll.insert({name: "Point1", geoField: {type: "Point", coordinates: [1, 1]}})); + assert.commandWorked(coll.insert( {name: "LineString1", geoField: {type: "LineString", coordinates: [[1, 1], [2, 2]]}})); - assert.writeOK(coll.insert({ + assert.commandWorked(coll.insert({ name: "Polygon1", geoField: {type: "Polygon", coordinates: [[[1, 1], [2, 2], [2, 1], [1, 1]]]} })); @@ -35,7 +36,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { [[151.0997772216797, -33.86157820443923], [151.21719360351562, -33.8952122494965]] } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a LineString within a geowithin sphere. testGeoWithinCenterSphere([[151.16789425018004, -33.8508357122312], 0.0011167360027064348], @@ -58,7 +59,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { ] } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a LineString forming a closed loop rectangle within a geowithin sphere. testGeoWithinCenterSphere([[174.75211152791763, -36.88962755605813], 0.000550933650273084], @@ -86,7 +87,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { ]] } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a Polygon within a geowithin sphere. testGeoWithinCenterSphere([[174.78536621904806, -41.30510816038769], 0.0009483659386360411], @@ -127,7 +128,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a MultiPolygon (two seperate polygons) within a geowithin sphere. testGeoWithinCenterSphere([[151.20821632978107, -33.865139891361636], 0.000981007241416606], @@ -161,7 +162,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { ]] } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a MultiPolygon (with a hole) within a geowithin sphere. testGeoWithinCenterSphere([[151.20936119647115, -33.875266834633265], 0.00020277354002627845], @@ -200,7 +201,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { "coordinates": [[96.328125, 5.61598581915534], [153.984375, -6.315298538330033]] } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a large query cap containing both of line vertices but not the line itself. // (should not return a match). @@ -223,7 +224,7 @@ function testGeoWithinCenterSphereLinePolygon(coll) { ]] } }; - assert.writeOK(coll.insert(geoDoc)); + assert.commandWorked(coll.insert(geoDoc)); // Test for a large query cap containing both of line vertices but not the line itself. // (should not return a match). |