-
Notifications
You must be signed in to change notification settings - Fork 301
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
Change | Separate tests for NetFx and NetCore - NetFx-Only Connection String Properties #2466
Changes from 2 commits
1ceeacb
f643c1d
8078560
a272be1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Unchanged files with check annotations Beta
<Target Name="RunManualTests"> | ||
<!-- Windows --> | ||
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test "@(ManualTestsProj)" -p:Configuration=$(Configuration) -p:Target$(TFGroup)Version=$(TF) --no-build -l "console;verbosity=normal" --collect "Code coverage" -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Windows$(TargetGroup) --filter "category!=non$(TargetGroup)tests&category!=failing&category!=nonwindowstests" "--logger:trx;LogFilePrefix=Manual-Windows$(TargetGroup)-$(TestSet)"" Condition="'$(IsEnabledWindows)' == 'true'"/> | ||
Check failure on line 189 in build.proj
|
||
<!-- Unix --> | ||
<Exec ConsoleToMsBuild="true" Command="$(DotnetPath)dotnet test "@(ManualTestsProj)" -p:Configuration=$(Configuration) -p:TargetNetCoreVersion=$(TF) --no-build -l "console;verbosity=normal" --collect "Code coverage" -p:TestSet=$(TestSet) --results-directory $(ResultsDirectory) -p:TestTargetOS=Unixnetcoreapp --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests" "--logger:trx;LogFilePrefix=Manual-Unixnetcoreapp-$(TestSet)"" Condition="'$(IsEnabledWindows)' != 'true'"/> | ||
</Target> |
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.
Array initialization is always the same size as the number of elements, so its unnecessary to specify 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.
Since you are eliminating the DeprecatedKeywordsCount reference here, you should just get rid of DeprecatedKeywordsCount entirely and just reference the size of this array in the one other place it's used. Otherwise, DeprecatedKeywordsCount needs to be changed from 3 to 5.
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.
@David-Engel Ok, I've updated the PR, chaning
DeprecatedKeywordsCount
to 5 and removingDeprecatedSynonymsCount
fromSqlConnectionString
. As far as I can tell, I can't accesss_notSupportedKeywords
array fromSqlConnectionString
, so I think it makes more sense to just change the number.As far as I can tell, the only reason for calculating the count is to determine the optimum size of the dictionary. net8 added support for a
FrozenDictionary
that has its size fixed at initialization, but it looks like we can't utilize that today. That'd be a nice option here...Please let me know if this isn't what you had in mind.
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 wasn't considering DeprecatedSynonymCount, just DeprecatedKeywordsCount. Just make sure the count is correct in the debug assert at line 927/928 of SqlConnectionString.cs after your changes. I'm pretty sure it's there to ensure we are initializing the Dictionary to the correct size to maximize perf. An incorrect count won't show up at runtime or in tests.
Debug.Assert(synonyms.Count == count, "incorrect initial ParseSynonyms size");
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.
Right. It sounds like we're on the same page, then.