spyhunter99 commented on code in PR #614:
URL: https://github.com/apache/jspwiki/pull/614#discussion_r4579338089


##########
jspwiki-main/src/test/java/org/apache/wiki/search/SearchManagerTest.java:
##########
@@ -246,6 +246,10 @@ Collection< String > pageNamesFor( final String text ) 
throws Exception {
         final Context ctx = Wiki.context().create( m_engine, request, 
ContextEnum.PAGE_EDIT.getRequestContext() );
         final Collection< SearchResult > search = m_mgr.findPages( text, ctx );
         final List< String > names = new ArrayList<>();
+        if( search == null ) {
+            // the provider has no answer until its index is built, and the 
tests wait for a result with this method
+            return names;

Review Comment:
   would it be better to wait a bit and try again with some kind of exit clause 
that will prevent it from waiting forever?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to