Skip to content

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

Closed
wants to merge 4 commits into from

Conversation

stIncMale
Copy link
Member

@stIncMale stIncMale commented Nov 2, 2023

Requested review from the same reviewers who reviewed the original #1221.

Note that the Evergreen patch for this PR includes the serverless-test and socket-test Evergreen tasks (they are not normally included, here they are included manually), which failed in Spruce. This PR fixes those failures.

JAVA-4754

…ed cluster, or when using Unix domain socket

JAVA-4754
@stIncMale stIncMale requested review from jyemin and vbabanin November 2, 2023 19:13
@stIncMale stIncMale self-assigned this Nov 2, 2023
switch (newType) {
case "Unknown":
return event.getNewDescription().getType() == ServerType.UNKNOWN;
case "LoadBalancer": {
return event.getNewDescription().getType() == ServerType.LOAD_BALANCER;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

And does it? :)

Copy link
Member Author

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.

Copy link
Member Author

@stIncMale stIncMale Nov 2, 2023

Choose a reason for hiding this comment

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

Ok, now it worked.

Comment on lines +251 to +254
if (getMongoClientSettings().getClusterSettings()
.getHosts().stream().anyMatch(serverAddress -> serverAddress instanceof UnixServerAddress)) {
tweaks.add(LogMatcher.Tweak.skip(LogMessage.Entry.Name.SERVER_PORT));
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@jyemin
Copy link
Collaborator

jyemin commented Nov 4, 2023

Rebased into two commits and merged on command line.

@jyemin jyemin closed this Nov 4, 2023
@stIncMale stIncMale deleted the JAVA-4754 branch August 16, 2024 17:20
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