Skip to content

Debug.Assert with side effects fix - #142

Merged
asfgit merged 5 commits into
apache:masterfrom
laimis:stallcontrol_fix
May 9, 2015
Merged

Debug.Assert with side effects fix#142
asfgit merged 5 commits into
apache:masterfrom
laimis:stallcontrol_fix

Conversation

@laimis

@laimis laimis commented May 8, 2015

Copy link
Copy Markdown
Contributor

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.

@laimis

laimis commented May 8, 2015

Copy link
Copy Markdown
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).

@laimis laimis changed the title Stallcontrol fix Debug.Assert with side effects fix May 8, 2015
@laimis

laimis commented May 9, 2015

Copy link
Copy Markdown
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.

@synhershko

Copy link
Copy Markdown
Contributor

All looks good, I don't see anything to discuss here really. Will merge now.

@asfgit
asfgit merged commit 085519a into apache:master May 9, 2015
@laimis
laimis deleted the stallcontrol_fix branch December 6, 2015 13:15
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.

3 participants