Skip to content

Commit 2e15906

Browse files
committed
SOLR-17661: Fix flaky TestLTRQParserPlugin tests
The flaky tests are: - TestLTRQParserPlugin.ltr_expensiveFeatureRescoring_shouldTimeOutAndReturnPartialResults - TestLTRQParserPlugin.ltr_expensiveFeatureRescoringAndPartialResultsNotTolerated_shouldRaiseException These tests have to timeout after the initial search is complete, and during the reranking phase. The reranking model takes 1 second to load, so increase the timeout to 800ms so that the search is more likely to complete in that timeframe.
1 parent 981b5d2 commit 2e15906

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

solr/modules/ltr/src/test/org/apache/solr/ltr/TestLTRQParserPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public void ltr_expensiveFeatureRescoring_shouldTimeOutAndReturnPartialResults()
153153
query.setQuery(solrQuery);
154154
query.setFields("id", "score");
155155
query.setRows(4);
156-
query.setTimeAllowed(300);
156+
query.setTimeAllowed(800);
157157
query.add("fv", "true");
158158
query.add("rq", "{!ltr model=slowModel reRankDocs=3}");
159159

@@ -187,7 +187,7 @@ public void ltr_expensiveFeatureRescoringAndPartialResultsNotTolerated_shouldRai
187187
query.setQuery(solrQuery);
188188
query.setFields("id", "score");
189189
query.setRows(4);
190-
query.setTimeAllowed(300);
190+
query.setTimeAllowed(800);
191191
query.add("partialResults", "false");
192192
query.add("fv", "true");
193193
query.add("rq", "{!ltr model=slowModel reRankDocs=3}");

0 commit comments

Comments
 (0)