-
Notifications
You must be signed in to change notification settings - Fork 1.7k
#2327 Handle null service name in RoundRobin constructor #2350
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: develop
Are you sure you want to change the base?
#2327 Handle null service name in RoundRobin constructor #2350
Conversation
- Fixes ThreeMammals#2327: Unit test failures with .NET 10.0.100-preview.7 - Converts null service names to empty string - Prevents ArgumentNullException when IConfiguration returns null
| ArgumentNullException.ThrowIfNull(services); | ||
| _servicesDelegate = services; | ||
| _serviceName = serviceName; | ||
| _serviceName = serviceName?? string.Empty; |
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.
Wow, is this really the bug fix? 🤣
It doesn’t seem related to the .NET SDK version. Can it be reproduced in .NET 9?
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.
Why are the CI tests failing when all tests pass successfully on my local machine?
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 warry, the build is green now. Use "Re-run job" button.
Why are the CI tests failing when all tests pass successfully on my local machine?
Yes, tests pass reliably locally and remain stable in the CI environment. A few CPU-sensitive tests might occasionally fail even on local runs, but overall, the tests are optimized to perform well in both environments.
The fact is, we have many tests in Ocelot Core that run parallel logic and are sensitive to thread synchronization. Syncing threads can be unpredictable, but usually, a simple re-run does the trick.
|
Will you hold off on adding the |
Fixes #2327
Proposed Changes
ArgumentNullExceptionwhenIConfigurationreturns null