paulirwin commented on issue #271: URL: https://github.com/apache/lucenenet/issues/271#issuecomment-2554744175
I spent more time looking at this last night and updated the BaseTokenStreamTestCase to be much closer to the original, mostly by removing some code that didn't exist upstream. The only thing that really differs from upstream is that `.Close()` is still called in the try/finally blocks, and I added Dispose to those as well, even though none of our implementations now use Dispose as of this PR. (https://github.com/apache/lucenenet/pull/1058) TestRandomChains still randomly fails (fairly reliably if you put a Repeat(100) on it), but it doesn't cause cascading failures, and I'm not convinced it's failing because of this issue. I'm not entirely sure where to go next from here, so I could use some help on this one with not only reviewing what I've got, but trying it out to figure out if more work needs to be done here or not. If TestRandomChains randomly failing _is_ related to this issue, I'd appreciate some enlightenment as to why, as that isn't clear to me. If the core problem with this issue was that failing analysis tests (TestRandomChains or otherwise) caused other cascading failures, that does not seem to be the case anymore. I am 99% sure I've solved the issue of TokenStreams being reused after Close is called. Next up I'll make a test that tests to make sure Dispose is not called before reuse (as that should not be done in a reusable way), and make those two types mentioned above reusable (even though they aren't causing any failing tests). -- 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-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org