Debug.Assert with side effects fix - #142
Merged
Merged
Conversation
Contributor
Author
|
@synhershko I am pushing the debug.asserts with side effects into this PR and then will wait for you to discuss what to do here (merge the changes, come up with some other "assert" method, etc). |
Contributor
Author
|
What I have here should be all that show up in unit test failures. Will do another pass in couple days to see if there are more spots like these in the code base. |
Contributor
|
All looks good, I don't see anything to discuss here really. Will merge now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestDocumentsWriterStallControl fails in Release mode but not in Debug builds. Looks like Lucene is performing logic when calling assert, which translated to Debug.Assert in Lucene.Net. Debug.Assert is removed at the compile time if compiled in release mode.
Took out the logic from the Debug.Assert.
Here is the failing test that this fixes:
http://teamcity.codebetter.com/viewLog.html?buildId=190748&tab=buildResultsDiv&buildTypeId=LuceneNet_Core#testNameId-5834889155160949386
There are more places in the code base that suffer from this, I believe. Looking for them.