Skip to content

Commit 3efb560

Browse files
authored
chore(java-shell): update MongoDB driver to 4.7.1 (#1344)
1 parent cf86556 commit 3efb560

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

packages/java-shell/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ dependencies {
2727
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
2828
testImplementation group: 'junit', name: 'junit', version: '4.12'
2929
implementation group: 'org.graalvm.js', name: 'js', version: '22.0.0.2'
30-
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.5.1'
30+
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.7.1'
3131
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.8'
3232
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
com.mongodb.MongoQueryException: Query failed with error code 2 and error message 'error processing query: ns=admin.collTree: $and
1+
com.mongodb.MongoQueryException: Query failed with error code 2 with name 'BadValue' and error message 'error processing query: ns=admin.collTree: $and
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
com.mongodb.MongoCommandException: Command failed with error 40415 (Location40415): 'BSON field 'create.expireAfterSeconds' is an unknown field.' on server %mongohostport%. The full response is {"ok": 0.0, "errmsg": "BSON field 'create.expireAfterSeconds' is an unknown field.", "code": 40415, "codeName": "Location40415"}
22
{ "acknowledged": true, "insertedId": <ObjectID> }
3-
{ "timestamp": {"$date": {"$numberLong": "1621296000000"}} }
3+
{ "timestamp": {"$date": {"$numberLong": "1662681600000"}} }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
com.mongodb.MongoCommandException: Command failed with error 72 (InvalidOptions): 'The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 86400, timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "minutes" } }' on server %mongohostport%. The full response is {"ok": 0.0, "errmsg": "The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 86400, timeseries: { timeField: \"timestamp\", metaField: \"metadata\", granularity: \"minutes\" } }", "code": 72, "codeName": "InvalidOptions"}
1+
com.mongodb.MongoCommandException: Command failed with error 72 (InvalidOptions): 'The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 315360000, timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "minutes" } }' on server %mongohostport%. The full response is {"ok": 0.0, "errmsg": "The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 315360000, timeseries: { timeField: \"timestamp\", metaField: \"metadata\", granularity: \"minutes\" } }", "code": 72, "codeName": "InvalidOptions"}
22
{ "acknowledged": true, "insertedId": <ObjectID> }
3-
{ "timestamp": {"$date": {"$numberLong": "1621296000000"}} }
3+
{ "timestamp": {"$date": {"$numberLong": "1662681600000"}} }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{ "acknowledged": true, "insertedId": <ObjectID> }
2-
{ "timestamp": {"$date": {"$numberLong": "1621296000000"}} }
2+
{ "timestamp": {"$date": {"$numberLong": "1662681600000"}} }

packages/java-shell/src/test/resources/db/createCollectionWithTimeseries.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ db.createCollection('coll', {
77
metaField: "metadata",
88
granularity: "minutes"
99
},
10-
expireAfterSeconds: 86400
10+
expireAfterSeconds: 60 * 60 * 24 * 365 * 10
1111
})
1212
// command
1313
db.coll.insertOne(
1414
{
1515
"metadata": { "sensorId": 5578, "type": "temperature" },
16-
"timestamp": ISODate("2021-05-18T00:00:00.000Z"),
16+
"timestamp": new ISODate("2022-09-09T00:00:00.000Z"),
1717
"temp": 12
1818
});
1919
// command
2020
db.coll.findOne({
21-
"timestamp": ISODate("2021-05-18T00:00:00.000Z")
21+
"timestamp": new ISODate("2022-09-09T00:00:00.000Z")
2222
}, {_id: 0, timestamp: 1});
2323
// clear
2424
db.coll.drop();

0 commit comments

Comments
 (0)