-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix #395: verify that "no options" Commands are not given any options #412
Conversation
*/ | ||
@JsonIgnoreProperties({"options"}) | ||
public interface NoOptionsCommand {} | ||
@RegisterForReflection |
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.
Without this, Native build CI/ITs failed; adding made them pass. Not 100% sure why but suspecting that default method implementation (annotation included, in particular) would not be retained.
I am glad we have tests for that set up to catch these problems.
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.
LGTM. Can you add unit test case for DeleteOne, and InsertOne?
|
||
// Only "empty" Options allowed, nothing else | ||
@Test | ||
public void illegalFilterConditionEmptyOptions() throws Exception { |
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.
Can this test be moved into ObjectMapperConfigurationTest.FindOne? Thats where the command is resolved.
This class is used to test resolving commands to operation.
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.
@maheshrajamani Ok makes sense, will move.
Yes, will add to same place where FindOneCommand unit test goes. |
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.
LGTM 👍
What this PR does:
Adds validation for
NoOptionsCommand
so that attempts to send options results in a failureWhich issue(s) this PR fixes:
Fixes #395
Checklist