Skip to content

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Sep 30, 2019

This commit fixes the initial randomization of nodes in a StaticConnectionPool. Instead of calling the protected ctor,
the initialization logic has been pulled out into a separate method that is now called from the ctor that accepts a
randomize parameter.

Fixes #4055

This commit fixes the initial randomization of nodes in a StaticConnectionPool. Instead of calling the protected ctor,
the initialization logic has been pulled out into a separate method that is now called from the ctor that accepts a
randomize parameter.

Fixes #4055

// assertion works on the probability of seeing a Uri other than https://10.0.0.1:9200/
// as the first value over 50 runs, when randomized.
Enumerable.Repeat(CreatStaticConnectionPool().CreateView().First().Uri.ToString(), 50)
Copy link
Member

Choose a reason for hiding this comment

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

I am looking to seeing this randomly fail 😸

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😃

@russcam russcam merged commit 02dfd4b into 7.x Oct 1, 2019
russcam added a commit that referenced this pull request Oct 1, 2019
This commit fixes the initial randomization of nodes in a StaticConnectionPool. Instead of calling the protected ctor,
the initialization logic has been pulled out into a separate method that is now called from the ctor that accepts a randomize parameter.

Fixes #4055

(cherry picked from commit 02dfd4b)
@russcam
Copy link
Contributor Author

russcam commented Oct 1, 2019

ported to 6.x

russcam added a commit that referenced this pull request Oct 1, 2019
This commit fixes the initial randomization of nodes in a StaticConnectionPool. Instead of calling the protected ctor,
the initialization logic has been pulled out into a separate method that is now called from the ctor that accepts a randomize parameter.

Fixes #4055
russcam added a commit that referenced this pull request Oct 1, 2019
This commit fixes the initial randomization of nodes in a StaticConnectionPool. Instead of calling the protected ctor,
the initialization logic has been pulled out into a separate method that is now called from the ctor that accepts a randomize parameter.

Fixes #4055
russcam added a commit that referenced this pull request Oct 3, 2019
This commit fixes the initial randomization of nodes in a StaticConnectionPool. Instead of calling the protected ctor,
the initialization logic has been pulled out into a separate method that is now called from the ctor that accepts a randomize parameter.

Fixes #4055
@Mpdreamz Mpdreamz deleted the fix/4055 branch November 6, 2019 19:06
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