Skip to content
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

Fix asserts that are failing on .NET Standard 2.0 #267

Closed
clambertus opened this issue Oct 10, 2019 · 1 comment · Fixed by #299
Closed

Fix asserts that are failing on .NET Standard 2.0 #267

clambertus opened this issue Oct 10, 2019 · 1 comment · Fixed by #299
Assignees
Labels

Comments

@clambertus
Copy link

There are a few asserts that fail on .NET Standard 2.0. They have been conditionally compiled out of the code due to the fact that on .NET Core 2.1 they cause the test runner to fatally crash, however these are a sign that something could be seriously wrong with the codecs (possibly causing index corruption).

Here are the known failures:

JIRA link - [LUCENENET-624] created by nightowl888

@clambertus clambertus added Lucene.Net Core is:bug up-for-grabs This issue is open to be worked on by anyone labels May 5, 2020
@NightOwl888 NightOwl888 added this to the Lucene.NET 4.8.0 milestone May 7, 2020
@NightOwl888 NightOwl888 self-assigned this Jun 29, 2020
@NightOwl888
Copy link
Contributor

NightOwl888 commented Jun 29, 2020

It turns out this is a design feature of Lucene that is used for testing. The asserts were failing by design in order to be "caught" in the BaseTermVectorsFormatTestCase. This becomes an issue on .NET Standard, because it is set up to cause a fatal crash when an assertion is thrown (when running in VSTest).

I am still analyzing what the options are, but I suspect that consistently throwing an InvalidOperationException rather than using Debug.Assert in each of the DocsAndPostionsEnum subclasses will likely be the answer.

@NightOwl888 NightOwl888 removed the up-for-grabs This issue is open to be worked on by anyone label Jun 29, 2020
NightOwl888 added a commit to NightOwl888/lucenenet that referenced this issue Jun 29, 2020
…estCase on TermVectorsReaders by throwing InvalidOperationException (fixes apache#267)
@NightOwl888 NightOwl888 modified the milestones: 4.8.0, 4.8.0-beta00009 Jun 30, 2020
NightOwl888 added a commit to NightOwl888/lucenenet that referenced this issue Jun 30, 2020
…estCase on TermVectorsReaders by throwing InvalidOperationException (fixes apache#267)
NightOwl888 added a commit that referenced this issue Jun 30, 2020
…estCase on TermVectorsReaders by throwing InvalidOperationException (fixes #267)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants