Skip to content

Conversation

kornilova203
Copy link
Collaborator

No description provided.

// command
db.coll.findOne({
"timestamp": ISODate("2021-05-18T00:00:00.000Z")
"timestamp": new ISODate("2022-09-09T00:00:00.000Z")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes necessary? They seem okay but shouldn’t make a difference since ISODate is not a constructor

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary but just looks better to me

@addaleax
Copy link
Collaborator

Fyi, I merged the base branch here because the base of PR was a version from May, so CI was failing due to outdated CI configs.

@addaleax
Copy link
Collaborator

@kornilova203 Getting some failures with MongoDB 4.0.x in CI:

 [2022/09/12 12:36:48.899] com.mongodb.mongosh.DbTest > testCreateCollectionWithTimeseries FAILED
 [2022/09/12 12:36:48.900]     org.junit.ComparisonFailure: expected:<...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: 864]00, timeseries: { ti...> but was:<...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: 3153600]00, timeseries: { ti...>
 [2022/09/12 12:36:48.900]         at org.junit.Assert.assertEquals(Assert.java:115)
 [2022/09/12 12:36:48.900]         at org.junit.Assert.assertEquals(Assert.java:144)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt.compare(testUtil.kt:190)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt.access$compare(testUtil.kt:1)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt$doTest$4.invoke(testUtil.kt:98)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt$doTest$4.invoke(testUtil.kt:71)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt.withDb(testUtil.kt:168)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt.doTest(testUtil.kt:71)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.TestUtilKt.doTest$default(testUtil.kt:36)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.DbTest$test$1.invoke(DbTest.kt:29)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.DbTest$test$1.invoke(DbTest.kt:28)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.ShellTestCase.withShell(ShellTestCase.kt:29)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.DbTest.test(DbTest.kt:28)
 [2022/09/12 12:36:48.900]         at com.mongodb.mongosh.DbTest.testCreateCollectionWithTimeseries(DbTest.kt:8)

@kornilova203
Copy link
Collaborator Author

@addaleax, thanks! I've pushed a fix

@addaleax addaleax merged commit 3efb560 into mongodb-js:main Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants