You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "paulirwin (via GitHub)" <gi...@apache.org> on 2026/06/10 20:47:50 UTC

[PR] Scan TestFramework assembly in analysis discovery tests, #1126 [lucenenet]

paulirwin opened a new pull request, #1333:
URL: https://github.com/apache/lucenenet/pull/1333

   - [X] You've read the [Contributor Guide](https://github.com/apache/lucenenet/blob/master/CONTRIBUTING.md) and [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).
   - [X] You've included unit or integration tests for your change, where applicable.
   - [X] You've included inline docs for your change, where applicable.
   - [X] There's an open issue for the PR that you are making. If you'd like to propose a change, please [open an issue](https://github.com/apache/lucenenet/issues/new/choose) to discuss the change or find an existing issue.
   
   Scan TestFramework assembly in analysis discovery tests
   
   Partial #1126
   
   ## Description
   
   TestRandomChains and TestAllAnalyzersHaveFactories discovered analysis components by scanning only the Analysis.Common assembly. In Java 4.8.1 these tests use `getClassesForPackage()` over the whole test classpath, which includes the test-framework's Mock*/Cranky/Validating components in package org.apache.lucene.analysis. In .NET those types live in the separate Lucene.Net.TestFramework assembly (already referenced), so they were never surfaced and the existing testComponents/brokenConstructors exclusion entries for them were dead code.
   
   Scan Lucene.Net.TestFramework alongside Analysis.Common so the 10 test-framework components are discovered, matching 4.8.1's coverage.
   
   The following types are added to coverage by this PR:
   - MockTokenizer
   - MockCharFilter
   - MockTokenFilter
   - MockGraphTokenFilter
   - MockHoleInjectingTokenFilter
   - MockRandomLookaheadTokenFilter
   - MockFixedLengthPayloadFilter
   - MockVariableLengthPayloadFilter
   - CrankyTokenFilter
   - ValidatingTokenFilter
   
   ## Scope Note
   
   This PR intentionally does not fully cover all types mentioned in #1126. This only updates the set of types to match Lucene 4.8.1. I think the best approach is to backport the Lucene 9 change mentioned in that issue, but that would (to stay true to the upstream change) require a new unit test project (i.e. Lucene.Net.Tests.Analysis) that references all of the projects in question, and thus more GitHub/ADO pipeline changes, etc. and should be done in its own PR. I think our best approach for now is to make this match Lucene 4.8.1 (this PR), and save the rest of #1126 for later (either 4.8.0 final or post-4.8).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Scan TestFramework assembly in analysis discovery tests, #1126 [lucenenet]

Posted by "paulirwin (via GitHub)" <gi...@apache.org>.
paulirwin commented on PR #1333:
URL: https://github.com/apache/lucenenet/pull/1333#issuecomment-4683953081

   Converting to draft since @NightOwl888 wants to contribute to finish up #1126 with this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Scan TestFramework assembly in analysis discovery tests, #1126 [lucenenet]

Posted by "NightOwl888 (via GitHub)" <gi...@apache.org>.
NightOwl888 merged PR #1333:
URL: https://github.com/apache/lucenenet/pull/1333


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org