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 2025/01/16 03:15:41 UTC

[I] Failing test: TestBufferedCharFilter.Test_Ready [lucenenet]

paulirwin opened a new issue, #1102:
URL: https://github.com/apache/lucenenet/issues/1102

   ### Is there an existing issue for this?
   
   - [x] I have searched the existing issues
   
   ### Describe the bug
   
   The `TestBufferedCharFilter.Test_Ready` test was missing the `[Test]` attribute, which was added in #1101. This test failed, however. It fails because it requires the provided TextReader to be a CharFilter where IsReady is true, and the test provides a StringReader that is not a CharFilter. We would need to determine if the upstream Harmony test was ported incorrectly, or if we need to find or create a CharFilter implementation that can be "ready" for this test to pass.
   
   ### Expected Behavior
   
   The test passes.
   
   ### Steps To Reproduce
   
   _No response_
   
   ### Exceptions (if any)
   
   _No response_
   
   ### Lucene.NET Version
   
   _No response_
   
   ### .NET Version
   
   _No response_
   
   ### Operating System
   
   _No response_
   
   ### Anything else?
   
   _No response_


-- 
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.apache.org

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


Re: [I] Failing test: TestBufferedCharFilter.Test_Ready [lucenenet]

Posted by "paulirwin (via GitHub)" <gi...@apache.org>.
paulirwin closed issue #1102: Failing test: TestBufferedCharFilter.Test_Ready
URL: https://github.com/apache/lucenenet/issues/1102


-- 
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: [I] Failing test: TestBufferedCharFilter.Test_Ready [lucenenet]

Posted by "NightOwl888 (via GitHub)" <gi...@apache.org>.
NightOwl888 commented on issue #1102:
URL: https://github.com/apache/lucenenet/issues/1102#issuecomment-2594553623

   A little insight into this. The `Reader` class in Java tracks some extra state that the .NET `TextReader` class does not. But this extra state is only required for a small number of classes in Lucene. So, rather than subclassing `TextReader` with a `Reader` class with the extra state and having to use adapters for every type of `TextReader` from .NET to turn it into a `Reader`, a new type named `BufferedCharFilter` was added to include both the functionality of `CharFilter` and the state from `BufferedReader` (which subclasses `Reader`) for those few types that required this extra tracking. This puts them in a different arrangement than in Java, so we need to account for this rewiring in the busines logic of `BufferedCharFilter`. The Harmony tests are from the `BufferedReader` class to ensure `BufferedCharFilter` does everything that `BufferedReader` does. Since this test was missing the `[Test]` attribute, it isn't too surprising that it doesn't pass by default and we need to ana
 lyze how the initial state of `IsReady` is managed in Java to fix the problem.
   
   Specifically, the extra state tracked in `Reader` is:
   
   - `mark` (an `int` to track a position)
   - `ready` (a `bool` to indicate whether the stream is ready to be read)


-- 
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