Skip to content

Conversation

ramasai1
Copy link
Contributor

@ramasai1 ramasai1 commented Dec 9, 2021

@stIncMale
Copy link
Member

stIncMale commented Dec 10, 2021

Currently I am unable to run tests. I am running ./gradlew test and nothing happens.

Just in case, I am throwing everything that comes to mind regarding running the tests locally:

  • JDK17.
  • An accessible MongoDB listening on localhost:27017 and with enabled test commands at the very least. I create mine via mtools with either of the three following commands:
    • mlaunch init --single --port 27017 --storageEngine=wiredTiger --setParameter enableTestCommands=1 -v
    • mlaunch init --replicaset --nodes 3 --port 27017 --storageEngine=wiredTiger --setParameter enableTestCommands=1 -v
    • mlaunch init --sharded 2 --mongos 1 --config 1 --replicaset --nodes 3 --port 27017 --storageEngine=wiredTiger --setParameter enableTestCommands=1 -v
  • Compile and run tests:
    • ./gradlew check

@ramasai1
Copy link
Contributor Author

Thanks! I was running my DB on a different port and was under the impression that it was on 27017.
Due to 2 constructors being annotated with @Deprecated in MongoWriteConcernException, there are a couple of deprecation warnings that are part of building the driver. These are in MongoOperationPublisher and MongoCollectionImpl. Should these be marked with @SuppressWarnings? Or should I be passing in an empty error labels BsonArray? @jyemin @stIncMale

@ramasai1 ramasai1 marked this pull request as ready for review December 14, 2021 14:56
@jyemin jyemin self-requested a review December 21, 2021 14:11
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.

Or should I be passing in an empty error labels BsonArray

Yes, might as well, since right after that the errorLabels are added

* @param writeConcernError the non-null write concern error
* @param writeConcernResult the write result
* @param serverAddress the non-null server address
* @since 3.2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change from 3.2 to 4.5

@@ -35,7 +35,7 @@
private final String codeName;
private final String message;
private final BsonDocument details;
private final Set<String> errorLabels;
@Deprecated private final Set<String> errorLabels;
Copy link
Collaborator

@jyemin jyemin Dec 21, 2021

Choose a reason for hiding this comment

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

Move this to the getter and add an @deprecated Javadoc tag.

@jyemin jyemin self-assigned this Jan 5, 2022
Copy link
Contributor Author

@ramasai1 ramasai1 left a comment

Choose a reason for hiding this comment

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

Added @Deprecated tags where necessary.

@ramasai1 ramasai1 requested a review from jyemin January 5, 2022 16:11
@jyemin jyemin merged commit 6f2aa50 into mongodb:master Jan 12, 2022
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