-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Make ServerSelectionLoggingTest
pass when run against a load balanced cluster, or when using Unix domain socket
#1243
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
Conversation
…ed cluster, or when using Unix domain socket JAVA-4754
switch (newType) { | ||
case "Unknown": | ||
return event.getNewDescription().getType() == ServerType.UNKNOWN; | ||
case "LoadBalancer": { | ||
return event.getNewDescription().getType() == ServerType.LOAD_BALANCER; | ||
} |
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.
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.
And does it? :)
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.
No, not initially. Hopefully, together with the new logging code it will.
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.
Ok, now it worked.
if (getMongoClientSettings().getClusterSettings() | ||
.getHosts().stream().anyMatch(serverAddress -> serverAddress instanceof UnixServerAddress)) { | ||
tweaks.add(LogMatcher.Tweak.skip(LogMessage.Entry.Name.SERVER_PORT)); | ||
} |
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.
JAVA-4754
JAVA-4754
…erver selection JAVA-4754
driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTest.java
Show resolved
Hide resolved
Rebased into two commits and merged on command line. |
Requested review from the same reviewers who reviewed the original #1221.
Note that the Evergreen patch for this PR includes the
serverless-test
andsocket-test
Evergreen tasks (they are not normally included, here they are included manually), which failed in Spruce. This PR fixes those failures.JAVA-4754