Skip to content

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

Closed
wants to merge 6 commits into from
Closed

Poller tests fix #960

wants to merge 6 commits into from

Conversation

jasells
Copy link

@jasells jasells commented Dec 31, 2020

This fixes #959 for running unit tests in Debug.

@jasells
Copy link
Author

jasells commented Jan 10, 2021

All tests run locally, not sure what the problem is

@valeriob
Copy link
Contributor

I encountered the same problem, is this fix ready ?

@dakelley95
Copy link

Encountered same issue as well. Would love this fix.

@@ -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;
Copy link
Member

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.

@drewnoakes
Copy link
Member

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.

@drewnoakes drewnoakes closed this Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple failing unit tests
4 participants