-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Convert legacy data lake tests to unified #1332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -267,7 +267,7 @@ OperationResult executeListDatabaseNames(final BsonDocument operation) { | |||
OperationResult executeListCollections(final BsonDocument operation) { | |||
MongoDatabase database = entities.getDatabase(operation.getString("object").getValue()); | |||
|
|||
BsonDocument arguments = operation.getDocument("arguments"); | |||
BsonDocument arguments = operation.getDocument("arguments", new BsonDocument()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was actually necessary to get the tests to pass. I decided to make the same change everywhere we get arguments, because this keeps happening every time we convert more tests.
ClientSession session = getSession(arguments); | ||
BsonDocument filter = arguments.getDocument("filter", new BsonDocument()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches all the other places where filter
is required. I had to make this change after changing the line two lines up, as the exception thrown on that line when there are no arguments was incorrectly causing the createFindCursor fails if filter is not specified
in unified-test-format/valid-fail
to pass.
will be removed soon, and this will just create a merge conflict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec says "Test runners MUST NOT execute killAllSessions
when connected to Atlas Data Lake.", yet com.mongodb.client.unified.UnifiedTest.setUp
(a superclass of UnifiedAtlasDataLakeTest
) calls CollectionHelper.killAllSessions
unconditionally. It seems to me that we should call killAllSessions
only if ClusterFixture.isDataLakeTest
returns true
.
I'm inclined to leave it as is. @jmikola I looked at your PR for this change in the specs repo (that Valentin linked to above), and I'm not clear where this restriction on killAllSessions for Data Lake originated. I am likely overlooking something, but it does seem unnecessary. |
I confirmed that killAllSessions is not supported on Data Lake, and it only works in the Java driver because we catch exceptions in the helper for killAllSessions. So I will add the check in as Valentin requested.] So never mind @jmikola |
JAVA-5354