Skip to content

DRIVERS-2232: remove usages of currentOp and collStats from tests #1402

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 2 commits into from
Apr 19, 2023

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Apr 12, 2023

Node POC: mongodb/node-mongodb-native#3638

This PR removes usage of the collStats command and currentOp from tests.

Please complete the following before merging:

  • Update changelog.
  • Make sure there are generated JSON files from the YAML test files.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).

@baileympearson baileympearson marked this pull request as ready for review April 13, 2023 17:22
@baileympearson baileympearson requested a review from a team as a code owner April 13, 2023 17:22
@baileympearson baileympearson requested review from tom-selander and removed request for a team April 13, 2023 17:22
@tom-selander tom-selander removed their request for review April 14, 2023 00:04
@dariakp dariakp requested review from a team and jyemin and removed request for a team April 14, 2023 13:47
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

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

Test changes LGTM and am fine with the reasoning for skipping the currentOp test.

@dariakp dariakp requested review from dariakp and removed request for jyemin April 17, 2023 17:17
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

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

LGTM.

An alternative solution would be to choose a max server version (say, 6.99.0) and prohibit it from running on any future server versions.

That's what we usually did, but feel free to do this in a separate PR. IMO, there's no advantage to wait until the first driver breaks, so we may as well do this already.

@baileympearson baileympearson requested a review from a team as a code owner April 18, 2023 18:54
@baileympearson baileympearson requested review from katcharov and removed request for a team April 18, 2023 18:54
@baileympearson baileympearson changed the title DRIVERS-2232: refactor collStats command usage to $collStats DRIVERS-2232: remove usages of currentOp and collStats from tests Apr 18, 2023
@@ -26,17 +26,18 @@ tests:
command:
ping: 1
command_name: ping
- description: "current op is not bypassed"
- description: "kill op is not bypassed"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intent of this test seems to test that bypassed commands are passed (it tests with ping above) and then this test asserts that a command that isn't encrypted or bypassed errors.

Replacing currentOp with killOp (another command that is neither bypassed or encrypted) tests the same scenario.

@baileympearson
Copy link
Contributor Author

@alcaeus I decided to address the currentOp test here but instead of adding a minimum server version, I changed the command to a killOp.

@dariakp dariakp merged commit 6632b76 into master Apr 19, 2023
@dariakp dariakp deleted the DRIVERS-2232-deprecate-collstats branch April 19, 2023 14:32
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.

5 participants