Skip to content

GODRIVER-2310 Add snapshot query examples #887

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 22 commits into from
Mar 30, 2022
Merged

GODRIVER-2310 Add snapshot query examples #887

merged 22 commits into from
Mar 30, 2022

Conversation

prestonvasquez
Copy link
Member

@prestonvasquez prestonvasquez commented Mar 23, 2022

GODRIVER-2310

  • Add the snapshot query examples requested in DRIVER-2181.
  • Reorganized the example function calls in TestDocumentationExamples into subtests per POC subtestWrapper #885
  • Add mtest usage in documentation_examples_test package

@prestonvasquez prestonvasquez changed the title GODRIVER-2301 Add snapshot query examples GODRIVER-2310 Add snapshot query examples Mar 24, 2022
Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

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

Looking great! Just a few comments; I can help debug any remaining failing tests offline.

Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

Nice updates using mtest!

Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

Some suggestions, but looks good (pending the one non-optional change to use options.Session()) 👍

Copy link
Contributor

@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.

Nicely done. The additional assertions outside of the example comments will help catch bugs. Wrapping the example functions in separate t.Run calls helps to run the individual tests locally.

Suggested a change that may resolve the test failure in StableAPIStrictCountExample.

Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

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

Looks great! Just a suggestion to remove Auth(false) for StableAPIStrictCountExample.

_, err := catColl.InsertMany(context.Background(), []interface{}{
bson.D{
{"adoptable", false},
{"name", "Miyagi"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is one of these the name of your cat haha

Copy link
Member Author

Choose a reason for hiding this comment

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

Miyagi is the name the shelter gave my cat, but I call him Mo :)

Copy link
Contributor

@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!

@prestonvasquez prestonvasquez merged commit 023a864 into mongodb:master Mar 30, 2022
@prestonvasquez prestonvasquez deleted the GODRIVER-2310.snapshotQueryExamples branch March 30, 2022 22:54
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.

4 participants