NightOwl888 commented on issue #264: URL: https://github.com/apache/lucenenet/issues/264#issuecomment-2571652872
There may be some compelling reasons that make RandomizedTesting useful for Lucene.NET: https://chatgpt.com/share/677a832d-3424-8005-97d7-1c024c68302d. There are a few features that Lucene uses that we don't have (such as running tests in random order and varying other parts of the test run). However, one benefit that makes a slightly stronger case for it: It would provide a level of indirection between NUnit's release schedule and Lucene.NET's schedule. In theory, we could roll out a new version of RandomizedTesting to keep up with NUnit changes without forcing us to also update Lucene.NET. While at this point I still think it is not required for the release of Lucene.NET 4.8.0, even with the latest update on #1017, it does mean that everything that we import from RandomizedTesting should be made internal and not available for end users. This is a must if we are going to expose it publicly later in another library. Ideally, we would move everything into the RandomizedTesting namespace and physically separate it from the test framework to make it less of a burden to make public later. RandomizedTesting in Java is implemented as a test runner. Based on my experience with setting up tests on Xamarin, I think if we did do a port of it, it should be implemented as a test runner that has a separate test adapter package (unfortunately, a test adapter is required for a custom runner, so we would need both). Separating them allows for a broader range of use cases than just plugging it into .NET Core or.NET Framework (such as building a custom console app to extend the functionality) or using it in some past or future runtime. Having our own test adapter is the only way we can take charge of NUnit instead of having NUnit drive everything. I don't think there is anything we can extend in the execution layer of NUnit without a test adapter, which is the only way we would be able to change how threads and/or tasks are implemented or to change the order of test execution in a repeatable random way. Also note that there already is a NuGet package ID for [RandomizedTesting](https://www.nuget.org/packages/RandomizedTesting) and a project in the [RandomizedTesting repository](https://github.com/NightOwl888/RandomizedTesting/tree/main/src/RandomizedTesting). It wouldn't be very difficult to configure it to release one package at a time each with their own version. -- 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