You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2021/12/09 03:50:16 UTC

[GitHub] [lucenenet] NightOwl888 opened a new pull request #568: Fix for hanging tests

NightOwl888 opened a new pull request #568:
URL: https://github.com/apache/lucenenet/pull/568


   This fixes `Lucene.Net.Search.Spell.TestSpellChecker::TestConcurrentAccess()` so it doesn't cause the tests to hang.
   
   - The thread priority was being incremented by 1 at the beginning of the `Run()` method. This was causing it to make other tests other tests hang (even though they are in other processes).
   - There were up to 10 threads being assigned, but in Java these threads were executed in a pool. Using `LimitedConcurrencyLevelTaskScheduler` to remedy this.
   - Added a `Shutdown()` method to immediately ignore work that is added to the task queue.
   - Added a cancellation token with a 60 second timeout (although this really doesn't have the same effect as the `awaitTermination()` method has in Java, it makes for a good demo).
   - Added the `[Timeout]` attribute to the test to abort after 5 minutes. This seems to be long enough time to get it to complete in a regular build, but we may need to adjust this to make it pass in the nightly build.
   
   This also adds the missing event to `LuceneTestCase.NewSearcher()` method to call `LimitedConcurrencyLevelTaskScheduler.Shutdown()` when `Dispose()` is called on the `IndexSearcher` to make it stop accepting new work. This missing feature may be affecting other tests, such as for `ControlledRealTimeReopenThread` or any other tests that use `ThreadedIndexingAndSearchingTestCase`.
   
   The `ICallable<V>` and `ICompletionService<V>` interfaces from Java were eliminated from `Lucene.Net.Support`, since they only add complexity with no real benefit.
   
   


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



[GitHub] [lucenenet] NightOwl888 merged pull request #568: Fix for hanging tests

Posted by GitBox <gi...@apache.org>.
NightOwl888 merged pull request #568:
URL: https://github.com/apache/lucenenet/pull/568


   


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