rmuir commented on a change in pull request #2414:
URL: https://github.com/apache/lucene-solr/pull/2414#discussion_r580231403
##########
File path:
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Hunspell.java
##########
@@ -49,20 +51,25 @@
* shared by multiple spell-checkers in different threads).
*/
public class Hunspell {
+ static final long SUGGEST_TIME_LIMIT = 250;
Review comment:
I don't want to make this complicated, but for test purposes can we make
this tweakable (even via package private method?)
I'm concerned about unit tests here being dependent on how fast the
underlying system is, we don't want false failures. I have two concerns:
1) suggester tests unrelated (to this feature) that might sporadically fail
because the system happens to be slow.
2) suggester tests related to this feature that might sporadically fail
because system is too fast.
There's a number of ways to ensure the tests stay robust. For example, in
case 1, if we could set a TimeoutPolicy.NO_TIMEOUT (or similar name), we'd
never hit false failures, even if say jenkins machine was running with load
average in the hundreds.
For case 2, where we really want to be 100% sure the timeout happens, even
if it is on @mikemccand super-fast machine, it would be nice if we could set
the limit to 0 (even if its a package-private setter just for testing or
something).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]