Skip to content

Add missing features in unified test format #820

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

Merged
merged 9 commits into from
Aug 4, 2021

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jul 8, 2021

CDRIVER-4066, CDRIVER-4060, CDRIVER-4064

While implementing the command redaction tests, I selectively implemented version 1.5 of the unified test format, ignoring 1.2, 1.3, and 1.4 as they weren't necessary. This PR fixes this.

For schema version 1.2, I've skipped implementing the loop operation and the storeEventsAsEntities option, as they are only required once we resume work on drivers atlas testing. We may decide to implement these earlier, but I didn't want to do so given the tight timeline on the other features.

In version 1.3 (load balancer support), the new load-balanced topology mode is accepted, but it obviously never matches. This will be added in a separate pull request related to load balancer.

@alcaeus alcaeus requested review from jmikola and kevinAlbs July 8, 2021 11:55
@alcaeus alcaeus self-assigned this Jul 8, 2021
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM! I only have suggested tweaks to the runOnRequirement checks.

@@ -1452,6 +1535,29 @@ operation_iterate_until_document_or_error (test_t *test,
return ret;
}

static bool
operation_close (test_t *test,
Copy link
Member

Choose a reason for hiding this comment

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

This operation is just for cursor types. Should the function be named operation_cursor_close instead?

Edit: I just realized that isn't typically done for other operation methods, so this is fine as-is.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this surprised me as well, as the operations don't seem to be tied to objects. @kevinAlbs want me to create a ticket for this?

Copy link
Collaborator

@kevinAlbs kevinAlbs Jul 9, 2021

Choose a reason for hiding this comment

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

The name of the operation functions should be 1:1 with the operation names from UTF, e.g. fooBar => operation_foo_bar.

I think the operation names must be unique in UTF. operation_close seems correct.

There is some precedent. Operations that can act on multiple object types, like operation_create_change_stream, currently checks the operation type within the function.

Copy link
Member

Choose a reason for hiding this comment

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

I think the operation names must be unique in UTF.

FWIW, this is not actually a requirement of the spec even if the names might appear unique in practice (if you're considering the variations of aggregate to be the same). I suppose we can punt on this until it actually becomes an issue.

Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Some questions but LGTM if the answers don't reveal anything.

alcaeus and others added 8 commits August 2, 2021 13:53
Since the only tests that are using the loop operation and storeEventsAsEntities are the drivers-atlas-testing tests, we can defer implementation of those two features until the atlas testing project.
Note that implementing the serverless topology check will be done separately
@alcaeus alcaeus force-pushed the unified-test-format-features branch from e06407c to 823c905 Compare August 2, 2021 12:57
@alcaeus alcaeus merged commit 08f9542 into mongodb:master Aug 4, 2021
@alcaeus alcaeus deleted the unified-test-format-features branch August 4, 2021 12:36
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.

3 participants