NightOwl888 commented on issue #1031:
URL: https://github.com/apache/lucenenet/issues/1031#issuecomment-2485569504

   The xharness project sounds promising.
   
   It allows implementing custom test runners, which is an issue we had on J2N 
when adding tests for Xamarin.Android. The official XUnit test runner would not 
scale to run 70,000+ tests, and the official NUnit runner used NUnitLite (which 
is going to be an issue for the Lucene.Net test framework which depends on 
NUnit), so we had to make our own runners. Debugging was also very manual. You 
basically had to add a filter with the name of the test you want to run and 
then set a breakpoint in that test.
   
   See https://github.com/NightOwl888/J2N/pull/96/files to see the 
configuration of Xamarin tests before they were removed - it took about 4 
months of trial and error to get the tests to run on Azure DevOps being that 
documentation on testing class libraries was scarce. We could still use this 
approach if xharness doesn't pan out, the only thing we would need to do is 
replace the projects that build the `.apk` to side load into the Android 
emulator and update the test runners to run on MAUI.
   
   Note that there were several limitations with Xamarin.Android that made 
testing worth it, though:
   
   1. Mono has incomplete generics. We had compilation problems with both 
`LurchTable<TKey, TValue>` and with `EqualityComparer<T>` that required 
breaking API changes in J2N to fix.
   2. There were limitations with memory mapped files. See: 
https://github.com/dotnet/android/issues/5423. These didn't affect Lucene.Net, 
but did cause some of the Harmony tests to fail in J2N.
   3. There were several problems with the way globalization was implemented in 
Xamarin.Android. See: https://github.com/dotnet/android/issues/5425.
   4. Some other APIs in Xamarin.Android threw `PlatformNotSupportedException` 
that made it necessary to find alternatives and/or conditionally suppress tests.
   
   As these issues were left open until Xamarin went out of support, I don't 
have high confidence that they have been addressed in MAUI, and may need to be 
re-reported. So, I agree that this is required before we can release 4.8.0 
because there may be more breaking changes required to fully support MAUI.
   
   I did a little experimentation and got the tests to run on 
`Lucene.Net.Analysis.Common` on Xamarin.Android at one point, but it has never 
been done for all of the Lucene.NET 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

Reply via email to