Skip to content

Conversation

fhassak
Copy link
Contributor

@fhassak fhassak commented Oct 12, 2017

No description provided.

@fhassak
Copy link
Contributor Author

fhassak commented Oct 12, 2017

Can you help me to see what went wrong:

Execution failed for task ':driver-core:codenarcTest'.

CodeNarc rule violations were found. See the report at: file:///home/travis/build/mongodb/mongo-java-driver/driver-core/build/reports/codenarc/test.html

I don't know how to access this file.

Because, it work on my machine

@jyemin
Copy link
Collaborator

jyemin commented Oct 12, 2017

I checked out this branch and ran

./gradlew driver-core:codenarcTest

and I see the failures. It's trailing whitespace on 7 lines of AggregatesFunctionalSpecification.groovy. The line numbers are 392, 416, 420, 443, 466, 467, 470

Copy link
Collaborator

@jyemin jyemin left a comment

Choose a reason for hiding this comment

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

This looks great. Just a few comments/questions.

*
* @param filter the filter expression
* @return this
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add

@since 3.6


/**
* @return the filter expression
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add

@since 3.6

@@ -26,6 +28,7 @@
public final class GraphLookupOptions {
private Integer maxDepth;
private String depthField;
private Bson restrictSearchWithMatch;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra space before field name.

fromHelper?.drop()
}

@IgnoreIf({ !serverVersionAtLeast(3, 4) })
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test seems redundant. Is this testing anything that's not already being tested above?

Copy link
Contributor Author

@fhassak fhassak Oct 13, 2017

Choose a reason for hiding this comment

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

Yes, it's redundant. I have added 2 tests :

  • with only restricSearchWithMatch option :
new GraphLookupOptions().restrictSearchWithMatch(eq('hobbies', 'golf')))
  • with all options ;
new GraphLookupOptions().depthField('depth').maxDepth(0).restrictSearchWithMatch(eq('hobbies', 'golf')))

I can remove one test. Which ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd remove the second one with all options

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done !

@jyemin
Copy link
Collaborator

jyemin commented Nov 8, 2017

I want to get this into 3.6 so can you revert the last commit?

Thanks!

@fhassak
Copy link
Contributor Author

fhassak commented Nov 8, 2017

Done !

@jyemin jyemin closed this Nov 8, 2017
@jyemin jyemin reopened this Nov 8, 2017
@jyemin jyemin merged commit e045c75 into mongodb:master Nov 8, 2017
@jyemin
Copy link
Collaborator

jyemin commented Nov 8, 2017

Thank you for the contribution.

Regards,
Jeff

antimony pushed a commit to antimony/mongo-java-driver that referenced this pull request Oct 1, 2018
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.

2 participants