-
Notifications
You must be signed in to change notification settings - Fork 757
Poller tests fix #960
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
Poller tests fix #960
Conversation
All tests run locally, not sure what the problem is |
I encountered the same problem, is this fix ready ? |
Encountered same issue as well. Would love this fix. |
Fixes nullability warning
@@ -57,7 +57,7 @@ public ByteArraySegment(ByteArraySegment otherSegment, int offset) | |||
/// <summary> | |||
/// Get the number of bytes within the buffer that is past the Offset (ie, buffer-length minus offset). | |||
/// </summary> | |||
public int Size => m_innerBuffer.Length - Offset; | |||
public int Size => m_innerBuffer == null ? 0 : m_innerBuffer.Length - Offset; |
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 about this change. Code shouldn't be using an initialised version of this struct. The buffer should always be non-null. If it's null here, then there's a bug somewhere else. That is the bug that should probably be identified and fixed. At least that's my working assumption.
Going to close this out as the primary change that was made here was made elsewhere (and so disappeared from this diff). The only remaining change is the null defense, and I don't think we should be making that, as commented above. |
This fixes #959 for running unit tests in Debug.