-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow IEndpointSource to return null Endpoint #172
Conversation
Let IEndpointSource return a null Endpoint during sending metrics to allow them to be skipped. Resolves #171
Codecov Report
@@ Coverage Diff @@
## master #172 +/- ##
==========================================
- Coverage 89.28% 88.24% -1.04%
==========================================
Files 19 19
Lines 448 451 +3
Branches 121 122 +1
==========================================
- Hits 400 398 -2
- Misses 18 22 +4
- Partials 30 31 +1
Continue to review full report at Codecov.
|
I'm a little confused by the code coverage results. I didn't expect files that I didn't modify to be impacted by this change. I haven't used Codecov before so I hope I'm not missing something obvious if there are some more tests that I need to add. |
|
||
using (var transport = new SocketTransport(endpointSource, SocketProtocol.IP)) | ||
{ | ||
transport.Send("teststat:1|c"); |
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.
So this test fails when your change is absent right?
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.
Yes, without my change it would throw a null reference exception when the sockets pool is being created.
There's some level of randomness in the tests that we haven't eliminated, so sometimes the coverage results vary for code unrelated to a change. It looks to me that you've added the appropriate test case to handle this change. |
@yousifh Thanks for your contribution 👍 I'll look at publishing 4.0.1 to NuGet.org with this change later this afternoon. |
Let IEndpointSource return a null Endpoint during sending metrics
to allow them to be skipped.
Resolves #171