-
Notifications
You must be signed in to change notification settings - Fork 150
SNOW-834807: Allow users to configure ServicePointManager.ConnectionLimit property #1224
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
base: master
Are you sure you want to change the base?
Conversation
…nector-net into SNOW-834807-Expose-ConnectionLimit
❌ 1 Tests Failed:
View the full list of 3 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
…nector-net into SNOW-834807-Expose-ConnectionLimit # Conflicts: # Snowflake.Data/Core/HttpUtil.cs
|
when you get there; would it be please possible to also extend the documentation @sfc-gh-ext-simba-lf ? Thank you in advance! |
Sure, I'll update the docs as well |
…nector-net into SNOW-834807-Expose-ConnectionLimit
Snowflake.Data.Tests/UnitTests/Session/SFHttpClientPropertiesTest.cs
Outdated
Show resolved
Hide resolved
Snowflake.Data.Tests/UnitTests/Session/SFHttpClientPropertiesTest.cs
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| [Test] | ||
| public void TestThrowsExceptionWhenSettingConnectionLimitPropertyToNonStringValue() |
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.
This is a string. Maybe TestThrowsExceptionWhenSettingConnectionLimitPropertyToNonNumericValue?
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.
You could also add other test cases:
"abc", "1.5", "true", etc.
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.
Renamed the test and also added the test cases mentioned above
| { | ||
| if (_servicePointConnectionLimit < 1) | ||
| { | ||
| s_logger.Warn($"Connection limit cannot be less than 1. Using the default value of {DefaultConnectionLimit}"); |
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.
| s_logger.Warn($"Connection limit cannot be less than 1. Using the default value of {DefaultConnectionLimit}"); | |
| s_logger.Warn($"Connection limit must be a positive integer. Using the default value of {DefaultConnectionLimit}"); |
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.
Changed the message to similar to the suggestion above and also mentioned the upper limit
|
|
||
| private void ValidateConnectionLimit() | ||
| { | ||
| if (_servicePointConnectionLimit < 1) |
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.
Don't we need an upper limit here?
cc: @sfc-gh-mhofman
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.
I'm not sure what the upper limit should be so it's currently set to 1000
Is there a specific upper limit you would like to use?
…nector-net into SNOW-834807-Expose-ConnectionLimit
Description
Allow users to configure ServicePointManager.ConnectionLimit property
Checklist
dotnet test)